A unique.timestamp provides a universally unique identifier which is also a human-readable timestamp. It represents UTC time, and it returns the time at the moment it was invoked.
The format of a unique.timestamp is
Where:
For example,
Provided a host machine's system clock continues to move forward only, this timestamp is guaranteed to be unique for that host.
If you have a collection of different hosts all generating unique.timestamps, then there is a statistical probability that some will end up being the same. This probability is dependent on the number of hosts, and the frequency with which the timestamps are being generatied. It is possible to extend unique.timestamp in a straight forward fashion so that this probability is as close to zero as is required.
The following executables are available from the UNIX command line (shell):
syntax:
returns a unique.timestamp as a string to stdout.
syntax:
Converts the given unique timestamp to the number of seconds since epoch.
syntax:
Returns the number of seconds between the two unique timestamps
The following C functions are available in source code form:
Generates a unique timestamp as a string, and stores it at the specified address ts
Produces a unique.timestamp, and stores it in ts. The value for pid is specified explicitly in pid, and the count is taken from a value pointed to by count.
Use this function when you want to specify the pid explicitly, and maintain the count yourself.
Scans a unique.timestamp, given as a string, and converts it to a time_t value. the microseconds, pid and count parts are ignored.
(20090615 02:39:35) This page was produced by rsml2html using the file unique.timestampAPI-0.9.0 as its source document