put_time(+integer_hour, +integer_min, +integer_sec, +integer_hun)

This built-in predicate sets the system time, if the program executing the call has enough rights to change the system time.

see also: date/3 get_cpu_time/1 put_date/3 time/4 time_elapsed/1

Examples
put_time(11, 34, 16, 0). this predicate sets the the current system time to 11:34:16 and 00 hundredths

 

Exceptions
The argument Arg is a variable an instantiation_error exception is thrown
The argument Arg is not an integer a type_error(integer, Arg) exception is thrown
The argument Arg result exceeds the integer range an evaluation_error(int_overflow) exception is thrown
The argument Arg is a negative integer an evaluation_error(negative, Arg) exception is thrown

 

 

info@trinc-prolog.com