summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-06-07 06:31:35 (GMT)
committerXinchen Hui <laruence@php.net>2012-06-07 06:31:35 (GMT)
commit6ecc9f1d9dfbfa264725aabcf52b75e31ce59deb (patch)
treeeb42442ef3ec2303fe1005e9158e2f3a29f04c2c
parentd9810af45ae9e3cbd2c97543b5dfa2d7c93e81c1 (diff)
downloadphp-6ecc9f1d9dfbfa264725aabcf52b75e31ce59deb.tar.gz
Remove unused codes
-rw-r--r--win32/time.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/win32/time.c b/win32/time.c
index 8b847b0..391a8a8 100644
--- a/win32/time.c
+++ b/win32/time.c
@@ -34,23 +34,21 @@
int getfilesystemtime(struct timeval *time_Info)
{
-FILETIME ft;
-__int64 ff;
-ULARGE_INTEGER convFromft;
+ FILETIME ft;
+ __int64 ff;
+ ULARGE_INTEGER convFromft;
GetSystemTimeAsFileTime(&ft); /* 100 ns blocks since 01-Jan-1641 */
- /* resolution seems to be 0.01 sec */
- /* ff = *(__int64*)(&ft); */
+ /* resolution seems to be 0.01 sec */
/*
- Do not cast a pointer to a FILETIME structure to either a
- ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows.
-
- via http://technet.microsoft.com/en-us/library/ms724284(v=vs.85).aspx
+ * Do not cast a pointer to a FILETIME structure to either a
+ * ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows.
+ * via http://technet.microsoft.com/en-us/library/ms724284(v=vs.85).aspx
*/
convFromft.HighPart = ft.dwHighDateTime;
convFromft.LowPart = ft.dwLowDateTime;
ff = convFromft.QuadPart;
-
+
time_Info->tv_sec = (int)(ff/(__int64)10000000-(__int64)11644473600);
time_Info->tv_usec = (int)(ff % 10000000)/10;
return 0;