root/tags/lgt290/library/timep.lgt

Revision 2, 0.7 KB (checked in by pmoura, 7 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2:- protocol(timep).
3
4
5    :- info([
6        version is 1.0,
7        authors is 'Paulo Moura',
8        date is 2000/7/24,
9        comment is 'Time protocol.']).
10
11
12    :- public(now/3).
13
14    :- mode(now(-integer, -integer, -integer), one).
15
16    :- info(now/3, [
17        comment is 'Returns current time.',
18        argnames is ['Hours', 'Mins', 'Secs']]).
19
20
21    :- public(cpu_time/1).
22
23    :- mode(cpu_time(-number), one).
24
25    :- info(cpu_time/1,
26        [comment is 'Returns the current cpu time.',
27         argnames is ['Time']]).
28
29
30    :- public(valid/3).
31
32    :- mode(valid(+integer, +integer, +integer), zero_or_one).
33
34    :- info(valid/3, [
35        comment is 'True if the arguments represent a valid time value.',
36        argnames is ['Hours', 'Mins', 'Secs']]).
37
38
39:- end_protocol.
Note: See TracBrowser for help on using the browser.