summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Sdk/timefuncs.h
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-14 12:43:21 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-14 12:43:21 +0000
commit5e85f48b85b54342b8bb472c10c5593abbb8b1eb (patch)
treec4a711d7da004557bb38c7bd9626fe77c727d96f /protocols/MRA/src/Sdk/timefuncs.h
parent515d2dbbe4b223757a6bbe838b329e0d045a6a36 (diff)
mra: w4 fixs
git-svn-id: http://svn.miranda-ng.org/main/trunk@11401 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Sdk/timefuncs.h')
-rw-r--r--protocols/MRA/src/Sdk/timefuncs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/MRA/src/Sdk/timefuncs.h b/protocols/MRA/src/Sdk/timefuncs.h
index eaee4a7e80..0bff545803 100644
--- a/protocols/MRA/src/Sdk/timefuncs.h
+++ b/protocols/MRA/src/Sdk/timefuncs.h
@@ -51,6 +51,20 @@ typedef union {
} FT;
+inline __time32_t _time32(__time32_t *timeptr)
+{
+ __time64_t tim;
+ FT nt_time;
+
+ GetSystemTimeAsFileTime(&(nt_time.ft_struct));
+ tim=(__time64_t)((nt_time.ft_scalar-EPOCH_BIAS)/10000000i64);
+ if (tim > (__time64_t)(_MAX__TIME32_T)) tim=(__time64_t)(-1);
+ if (timeptr) *timeptr = (__time32_t)(tim);// store time if requested
+
+return(__time32_t)(tim);
+}
+
+
inline __time32_t MakeTime32FromLocalSystemTime(CONST PSYSTEMTIME pcstSystemTime)
{
__time64_t tim=0;