Site Tools


utime_script

Table of Contents

# $EPIC: utime_script.txt,v 1.3 2007/02/27 04:57:37 jnelson Exp $

Synopsis:

load utime
$utime_add(sec1 usec1 sec2 usec2)
$utime_sub(newer_sec newer_usec older-sec older_usec)
$time_since(sec1 usec1)

Description:

The utime function returns a string with two words, the first word containing the number of seconds and the second word containing the number of useconds.

This script creates three functions that make it easier to work with these values.

The utime_add function takes two utime values (for a total of 4 words) and adds them together. This can be useful to calculate what time in the future is a certain interval away

The utime_sub function takes two utime values, the first of which should be newer than the second, and tells you how much time elapsed between them.

The time_since function takes one utime value, and tells you how much time has elapsed since then.

History:

This script first appeared in epic4pre0.042.

utime_script.txt · Last modified: 2007/02/27 04:57 by 127.0.0.1