How to fix time for popup window

hi every one
i want to generate the popup window on db time,
the popup show if the hours set it show after 1hour or set any mints or secs,
i have the problem in setting the time if he set the time 5mints,
how i retriew the time from the database,
and how handle it