How to convert time from Timeticks (ASN_TIMETICKS from net-snmp library) to any c++ datetime format?
Thx.
How to convert time from Timeticks (ASN_TIMETICKS from net-snmp library) to any c++ datetime
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Time Ticks are units of 10ms elapsed since the agent last reinitialized; in order to convert to an absolute timestamp, you need to establish a mapping between agent uptime and wall clock time.
Typically, you query
sysUptime.0and note down when the response arrived in order to get the initialization time; you can either do this once at startup and everytime you receive one of the standard traps (cold/warm restart, link up) in order to catch agent restarts, or you include it in the GET request (for GETNEXT, ask forsysUptime, leaving out the instance ID).