Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / logstash   deb

Repository URL to install this package:

/ opt / logstash / vendor / bundle / jruby / 1.9 / gems / hitimes-1.2.1-java / ext / hitimes / c / hitimes_instant_windows.c

#ifdef USE_INSTANT_WINDOWS

#include "hitimes_interval.h"


/*
 * returns the conversion factor, this value is used to convert
 * the value from hitimes_get_current_instant() into seconds
 */
long double hitimes_instant_conversion_factor()
{
    LARGE_INTEGER ticks_per_second;
    QueryPerformanceFrequency( &ticks_per_second );
    return (double)ticks_per_second.QuadPart;
}

/*
 * returns the number of ticks
 */
hitimes_instant_t hitimes_get_current_instant()
{
    LARGE_INTEGER tick;
    QueryPerformanceCounter(&tick);
    return (hitimes_instant_t)tick.QuadPart;
}

#endif