|
Revision 2, 432 bytes
(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 | :- object(time, |
|---|
| 3 | implements(timep)). |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | :- info([ |
|---|
| 7 | version is 1.0, |
|---|
| 8 | authors is 'Paulo Moura', |
|---|
| 9 | date is 2000/7/24, |
|---|
| 10 | comment is 'Time predicates.']). |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | now(Hours, Mins, Secs) :- |
|---|
| 14 | {lgt_current_time(Hours, Mins, Secs)}. |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | cpu_time(Seconds) :- |
|---|
| 18 | {lgt_cpu_time(Seconds)}. |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | valid(Hours, Mins, Secs) :- |
|---|
| 22 | integer(Hours), Hours >= 0, |
|---|
| 23 | integer(Mins), Mins >= 0, Mins =< 59, |
|---|
| 24 | integer(Secs), Secs >= 0, Secs =< 59. |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | :- end_object. |
|---|