rllib  1
Classes | Namespaces | Functions
rltime_v2.cpp File Reference
#include "rltime_v2.h"
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>
#include <math.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <ssdef.h>
#include <iodef.h>
#include <starlet.h>
#include <descrip.h>
#include <lib$routines.h>
#include <libdef.h>
#include <jpidef.h>
#include <windows.h>
#include <mmsystem.h>
Include dependency graph for rltime_v2.cpp:

Go to the source code of this file.

Classes

struct  TDS
 
struct  VAX_BIN_TIME
 

Namespaces

 ns_rltime_v2
 

Functions

static struct tm * gmtime_r (const time_t *t, struct tm *r)
 
static struct tm * localtime_r (const time_t *t, struct tm *r)
 

Function Documentation

◆ gmtime_r()

static struct tm* gmtime_r ( const time_t *  t,
struct tm *  r 
)
static

Definition at line 65 of file rltime_v2.cpp.

66 {
67  // gmtime is threadsafe in windows because it uses TLS
68  struct tm *theTm = gmtime(t);
69  if (theTm) {
70  *r = *theTm;
71  return r;
72  } else {
73  return 0;
74  }
75 }

◆ localtime_r()

static struct tm* localtime_r ( const time_t *  t,
struct tm *  r 
)
static

Definition at line 80 of file rltime_v2.cpp.

81 {
82  // localtime is threadsafe in windows because it uses TLS
83  struct tm *theTm = localtime(t);
84  if (theTm) {
85  *r = *theTm;
86  return r;
87  } else {
88  return 0;
89  }
90 }