2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/v2/engine/timestamp.h
Jurko Gospodnetić 1f4e39984b Windows Boost Jam implementation now uses finer resolution than 1 second when creating timestamps based on the current system time. Since these are never (and should never be!) compared to file system timestamps - this causes no conflicts with file system timestamps still using 1 second resolution at best.
Related stylistic changes:
  - filetime_to_timestamp() function renamed to timestamp_from_filetime() and moved to the timestamp.c module.
  - filetime_to_seconds() function moved back to the execnt.c module as a static function as it only used from there after the timestamp_from_filetime() reimplementation in revision [79494].
  - filent.h header now empty and removed.

[SVN r79511]
2012-07-14 18:55:06 +00:00

47 lines
1.2 KiB
C

/*
* Copyright 1993, 1995 Christopher Seiwald.
*
* This file is part of Jam - see jam.c for Copyright information.
*/
/*
* timestamp.h - get the timestamp of a file or archive member
*/
#ifndef TIMESTAMP_H_SW_2011_11_18
#define TIMESTAMP_H_SW_2011_11_18
#include "object.h"
#ifdef OS_NT
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
#include <time.h>
typedef struct timestamp
{
time_t secs;
int nsecs;
} timestamp;
void timestamp_clear( timestamp * const );
int timestamp_cmp( timestamp const * const lhs, timestamp const * const rhs );
void timestamp_copy( timestamp * const target, timestamp const * const source );
void timestamp_current( timestamp * const );
int timestamp_empty( timestamp const * const );
void timestamp_from_path( timestamp * const, OBJECT * const path );
void timestamp_init( timestamp * const, time_t const secs, int const nsecs );
void timestamp_max( timestamp * const max, timestamp const * const lhs,
timestamp const * const rhs );
char const * timestamp_str( timestamp const * const );
#ifdef OS_NT
void timestamp_from_filetime( timestamp * const, FILETIME const * const );
#endif
void timestamp_done();
#endif