Sha256: 32b60146e95efa0107f8698bb34baf1847046e5155fd4794682030d783be6120

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

/*
 *	UNIX-style Time Functions
 *
 */
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include "vms_unix_time.h"

/*
 *	gettimeofday(2) - Returns the current time
 *
 *	NOTE: The timezone portion is useless on VMS.
 *	Even on UNIX, it is only provided for backwards
 *	compatibilty and is not guaranteed to be correct.
 */

#if (__VMS_VER < 70000000)
int gettimeofday(tv, tz)
struct timeval  *tv;
struct timezone *tz;
{
    timeb_t tmp_time;

    ftime(&tmp_time);

    if (tv != NULL)
    {
	tv->tv_sec  = tmp_time.time;
	tv->tv_usec = tmp_time.millitm * 1000;
    }

    if (tz != NULL)
    {
	tz->tz_minuteswest = tmp_time.timezone;
	tz->tz_dsttime = tmp_time.dstflag;
    }

    return (0);

} /*** End gettimeofday() ***/
#endif

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pdf2json-0.2.0 pdf2json-0.52-source/goo/vms_unix_times.c
pdf2json-0.1.0 pdf2json-0.52-source/goo/vms_unix_times.c