From 7553b7f9d4dddc2235c137d41de8ce22547bebe3 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 1 Jul 2015 17:36:37 +0200 Subject: Initial commit --- ostime.dcl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 ostime.dcl (limited to 'ostime.dcl') diff --git a/ostime.dcl b/ostime.dcl new file mode 100644 index 0000000..1c36a8d --- /dev/null +++ b/ostime.dcl @@ -0,0 +1,30 @@ +definition module ostime + +// Clean Object I/O library, version 1.2 + +import StdOverloaded +import ostoolbox + +:: OSTime + +osMaxTime :: OSTime + +osGetTime :: !*OSToolbox -> (!OSTime,!*OSToolbox) +// osGetTime returns the current OS time + +osWait :: !Int .x !*OSToolbox -> (.x, !*OSToolbox) +// osWait waits atleast the given time (in milliseconds). + +osGetBlinkInterval :: !*OSToolbox -> (!Int, !*OSToolbox) +// osGetBlinkInterval returns the recommended blink interval time of a cursor (in milliseconds). + +osGetCurrentTime :: !*OSToolbox -> (!(!Int,!Int,!Int),!*OSToolbox) +// osGetCurrentTime returns current (hours,minutes,seconds). + +osGetCurrentDate :: !*OSToolbox -> (!(!Int,!Int,!Int,!Int),!*OSToolbox) +// osGetCurrentTime returns current (year,month,day,day_of_week). + +instance - OSTime // Calculate difference between arg 1 and arg 2 +instance < OSTime // True iff arg 1 < arg 2 +instance toInt OSTime // Coerce OSTime to Integer (always positive or zero) +instance fromInt OSTime // Coerce Int to OSTime (Integer will be made zero if negative) -- cgit v1.2.3