![]() | ![]() | ![]() | encode-time-of-day | ![]() |
|
| hour minute second
&optional universal-time
=> universal-time | [Function] |
Purpose
Return a universal time representing a specified
time-of-day.
Package :portable-threads
Module :portable-threads
Arguments and values
| hour | An integer between 0 and 23, inclusive | |
| minute | An integer between 0 and 59, inclusive | |
| second | An integer between 0 and 59, inclusive | |
| universal-time | A universal time (default is nil,
which is equivalent to the value returned by
(get-universal-time))
|
Description
If the specified time-of-date has already passed (relative to
the universal-time value), the next day is assumed.
See also
schedule-function
Examples
Schedule a scheduled function that prints "It's quitting time!"
every day at 5pm:
> (schedule-function
(make-scheduled-function
#'(lambda (scheduled-function)
(declare (ignore scheduled-function))
(print "It's quitting time!"))
:name 'quitting-time)
(encode-time-of-day 17 0 0) :repeat-interval #.(* 24 60 60))
>
Verbosely change quitting-time to 5:30pm every day:
> (schedule-function 'quitting-time (encode-time-of-day 17 30 0)
:repeat-interval #.(* 24 60 60)
:verbose 't)
;; Unscheduling #<scheduled-function quitting-time [17:00:00]>...
;; Scheduling #<scheduled-function quitting-time [17:30:00]>
;; as the next scheduled-function...
>
The GBBopen Project
![]() | ![]() | ![]() | encode-time-of-day | ![]() |