system_time.h File Reference

System uptime APIs. More...


Defines

#define USEC_PER_SEC   1000000
 number of microseconds per second

Functions

int system_time_booted (struct timeval *boottime)
 Fills in the timeval with the time that the system was booted.
int system_time_up (struct timeval *uptime)
 Fills in the timeval with the time since the system booted.
int system_time_pfe_up (struct timeval *uptime)
 Fills in the timeval with the time since the PFE booted.


Detailed Description

System uptime APIs.


Function Documentation

int system_time_booted struct timeval *  boottime  ) 
 

Fills in the timeval with the time that the system was booted.

Supposedly, the kernel will adjust boottime when settimeofday() is called, so the system boot time *can* change.

Parameters:
[out] boottime Pointer to location to store boot time
Returns:
0 on success; Otherwise, -1 on error and the global variable errno will be set with the error code.

int system_time_pfe_up struct timeval *  uptime  ) 
 

Fills in the timeval with the time since the PFE booted.

Note:
This API is only supported in the RE SDK. It is not supported in the Services SDK.
Parameters:
[out] uptime Pointer to location to store uptime
Returns:
0 on success; Otherwise, -1 on error, and the global variable errno will be set with the error code.

int system_time_up struct timeval *  uptime  ) 
 

Fills in the timeval with the time since the system booted.

Parameters:
[out] uptime Pointer to location to store uptime
Returns:
0 on success; Otherwise, -1 on error and the global variable errno will be set with the error code


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:24:32 2010 for libjuniper by Doxygen 1.4.5