home
topology files
command‑line options
the core API
FAQ
download and install
|
cnet's Application Programming Interface
- NAME
- CNET_set_time_of_day - set the node's "wall-clock" time.
- SYNOPSIS
-
#include <cnet.h>
int CNET_set_time_of_day(long newsec, long newusec);
- DESCRIPTION
-
This function changes the node's "wall-clock" time of day.
As each node's
nodeinfo structure is considered a read-only variable,
this is the only method to set its
time_of_day.sec and time_of_day.usec fields.
nodeinfo.time_of_day.sec is the number of seconds since Jan. 1, 1970,
and may be used in a call to the POSIX C function ctime(3c)) .
- RETURN VALUE
-
The value
0 is returned on success.
On failure, the value -1 is returned,
and the global variable cnet_errno is set to one of the
following values to describe the error:
ER_BADARG
- Either
newsec or newusec is less than 0 ,
or newusec is greater than 999999 .
|