This built-in predicate determines the time since the program was started in milliseconds. It can be used to calculate the elapsed time between two events.
see also: date/3 put_date/3 put_time/4 time/4 time_elapsed/1
| Examples | |
| get_cpu_time(T). | The variable T is assigned the number of milliseconds since the start of the program, for instance T can be assigned the value 3916734 |
| 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 |