Rope Language Reference - '$kernel_time', '$packet_time'

For a tutorial on Rope's time and date handling features, see: TimeAndDate.

"$kernel_time" is a read-only register that contains the current system time, measured in seconds since the unix "epoch" (00:00:00 UTC Jan 1st, 1970). For more technical details of the unix system interpretation, see "time(2)".

"$packet_time" is similar, but it contains the time at which the packet being inspected arrived.

The value returned may be converted into it's components (seconds, minutes, hours, day, month, year etc) using localtime or gmtime.

The following example verifies that it is monday.

$kernel_time localtime tm_wday 1 eq asset

Revision History

These registers are not available in versions dated before 14th Feb 2005.

See Also

TimeAndDate, localtime, gmtime, tm_mday (etc).