Esnmp_Sysuptime - Compaq TCP/IP Services for OpenVMS Programming And Reference Manual

Tcp/ip services for openvms
Table of Contents

Advertisement

eSNMP API Routines

esnmp_sysuptime

esnmp_sysuptime
Converts UNIX system time obtained from
same time base as
Format
unsigned int esnmp_sysuptime ( struct timeval *timestamp ) ;
Argument
timestamp
A pointer to
gettimeofday
A null pointer means return the current
Description
This routine provides a mechanism to convert UNIX timestamps into eSNMP
TimeTicks
timestamp was
This routine can be used as a
master agent started) in hundredths of a second. The time base is obtained from
the master agent in response to
time will not be accurate.
Return Values
0
Example
#include <sys/time.h>
#include <esnmp.h>
struct timeval timestamp;
gettimeofday(&timestamp, NULL);
.
.
.
o_integer(vb, object, esnmp_sysuptime(&timestamp));
5–18 eSNMP API Routines
sysUpTime
.
, which contains a value obtained from the
struct timeval
system call. The structure is defined in
. The function returns the value that
.
now
TimeTicks
esnmp_init
An error occurred because a
function failed. Otherwise,
the time in hundredths of a second since the
master agent started.
into a value with the
gettimeofday
include/sys/time.h
.
sysUpTime
sysUpTime
held when the passed
data type (the time since the eSNMP
, so calls to this function before that
gettimeofday
timestamp
.
contains

Advertisement

Table of Contents
loading

Table of Contents