ostime.dcl 1.04 KB
Newer Older
Peter Achten's avatar
Peter Achten committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
28
instance <       OSTime		// True iff arg 1 < arg 2
Peter Achten's avatar
Peter Achten committed
29
30
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)