# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.

module alarm;

unsafe command alarm.sleep(secs:int):void
address ALARMsleep
comment "Sleep a few seconds";

#command alarm.action(secs:int, action:str):void
#address ALARMsetalarm
#comment "Execute a MAL action after a few secs. NYI";

#unsafe command alarm.timers() (time:bat[:str],action:bat[:str])
#address ALARMtimers
#comment "Give the list of all active timers. NYI";

unsafe command alarm.usec() :lng
address ALARMusec
comment "Return time in microseconds.";

unsafe command alarm.time() :int
address ALARMtime
comment "Return time in milliseconds.";

unsafe command alarm.epoch() :int
address ALARMepoch
comment "Return the current time as UNIX epoch.";

unsafe command alarm.ctime() :str
address ALARMctime
comment "Return the current time as a C-time string.";

command alarm.prelude():void
address ALARMprelude
comment "Initialize alarm module.";

command alarm.epilogue():void
address ALARMepilogue
comment "Finalize alarm module.";

alarm.prelude();

