HRTIME

Section: High-resolution timing (2)
Updated: Release 0.5
Index Return to libhrtime home
 

NAME

get_hrtime_self, get_hrvtime_self, get_hrutime_self, get_hrstime_self, - self timing functions  

SYNOPSIS

#include <hrtime.h>

void get_hrtime_self(hrtime_t *dest);
void get_hrvtime_self(hrtime_t *dest);
void get_hrutime_self(hrtime_t *dest);
void get_hrstime_self(hrtime_t *dest);
 

ARGUMENTS

dest
Specifies the location to which the desired timing value should be written. Again, it is the responsibility of the caller to insure that dest is non-null.
 

DESCRIPTION

get_hrtime_self
writes the wall time of the current process, in timestamp counter ticks, to the location specified by dest. hrtime_init must be called prior to calling this function.
get_hrvtime_self
writes the total virtual time of the current process, in timestamp counter ticks, to the location specified by dest. hrtime_init must be called prior to calling this function.
get_hrutime_self
writes the virtualized user time of the current process, in timestamp counter ticks, to the location specified by dest. This function returns an undefined value if the kernel was not configured with CONFIG_HRUSTIME, the option enabling additional instrumentation on the system call path. You can check for this at runtime by mapping a struct hrtime and looking at hr->has_ustime. hrtime_init must be called prior to calling this function.
get_hrstime_self
writes the virtualized system time of the current process, in timestamp counter ticks, to the location specified by dest. This function returns an undefined value if the kernel was not configured with CONFIG_HRUSTIME, the option enabling additional instrumentation on the system call path. You can check for this at runtime by mapping a struct hrtime and looking at hr->has_ustime. hrtime_init must be called prior to calling this function.
 

BUGS

The current implementation is based on the flawed assumption that the timestamp counter is incremented once per clock cycle (this is true on all current implementations of Intel processors, but not guaranteed in the specification).

 

AUTHOR

Nick Rasmussen <nick@jive.org>  

SEE ALSO

get_hrtime(2), get_hrvtime(2), get_hrutime(2), get_hrstime(2), get_hrtime_struct(2), free_hrtime_struct(2), hrtime_init(2), times(2), gettimeofday(2)


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
BUGS
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 16:52:45 GMT, May 04, 2000