#include <tsci2.h>
#include <stdint.h>
uint64_t tsci2_gettimeofday();
tsci2_getticks provides direct access to the ticks reading of TSC register, which is 64 bits long.
The following code shows how to use tsci2_getticks().
#include <stdio.h>
#include <tsci2.h>
#include <stdint.h>
int main(int argc, char **argv) {
int preferred_methods, method;
tsci2_context cxt;
uint64_t ticks;
preferred_methods = TSCI2_DAEMON | TSCI2_FALLBACK;
method = tsci2_init(preferred_methods);
if ( method == TSCI2_ERROR )
printf("Error initializing tsci2 library!\n");
ticks = tsci2_getticks();
printf("ticks value is %llu.\n", ticks);
tsci2_shutdown();
}