WhizzML Reference Manual

4.10 Time

Time manipulation procedures are currently limited to the primitive current-time, which returns the current time as the number of milliseconds since Jan 1st, 1970 (that is, the Unix epoch).

(current-time ) \(\rightarrow \) integer

(current-time) ;; => 1494285448247

The standard library also includes the procedure sleep:

(current-time intmsecs) \(\rightarrow \) integer

which takes an integer number of milliseconds and waits (up to 16 seconds), returning the actual number of milliseconds spent waiting: zero if intmsecs is negative, or its argument up to the maximum sleep period (16000 milliseconds).

(sleep -3) ;; => 0 (no wait)
  (sleep 12345) ;; => 12345
  (sleep 10000000) ;; => 16000