mudgangster

Tiny, scriptable MUD client
Log | Files | Refs | README

unix_time.h (172B)


      1 #pragma once
      2 
      3 #include <time.h>
      4 
      5 inline double get_time() {
      6 	struct timespec ts;
      7 	clock_gettime( CLOCK_MONOTONIC, &ts );
      8 
      9 	return double( ts.tv_sec ) + ts.tv_nsec / 1e9;
     10 }