1 /* 2 * Copyright 1993, 1995 Christopher Seiwald. 3 * 4 * This file is part of Jam - see jam.c for Copyright information. 5 */ 6 7 /* 8 * timestamp.h - get the timestamp of a file or archive member 9 */ 10 11 #ifndef TIMESTAMP_H_SW_2011_11_18 12 #define TIMESTAMP_H_SW_2011_11_18 13 14 #include "config.h" 15 #include "object.h" 16 17 #ifdef OS_NT 18 # include <windows.h> 19 #endif 20 21 #include <time.h> 22 23 typedef struct timestamp 24 { 25 time_t secs; 26 int nsecs; 27 } timestamp; 28 29 void timestamp_clear( timestamp * const ); 30 int timestamp_cmp( timestamp const * const lhs, timestamp const * const rhs ); 31 void timestamp_copy( timestamp * const target, timestamp const * const source ); 32 void timestamp_current( timestamp * const ); 33 int timestamp_empty( timestamp const * const ); 34 void timestamp_from_path( timestamp * const, OBJECT * const path ); 35 void timestamp_init( timestamp * const, time_t const secs, int const nsecs ); 36 void timestamp_max( timestamp * const max, timestamp const * const lhs, 37 timestamp const * const rhs ); 38 char const * timestamp_str( timestamp const * const ); 39 char const * timestamp_timestr( timestamp const * const ); 40 41 #ifdef OS_NT 42 void timestamp_from_filetime( timestamp * const, FILETIME const * const ); 43 #endif 44 45 void timestamp_done(); 46 double timestamp_delta_seconds( timestamp const * const, timestamp const * const ); 47 48 #endif 49