OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2009 The Android Open Source Project | 3 * Copyright 2009 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkTime.h" | 10 #include "SkTime.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 dt->fTimeZoneMinutes = SkToS16(tz_bias); | 32 dt->fTimeZoneMinutes = SkToS16(tz_bias); |
33 dt->fYear = st.wYear; | 33 dt->fYear = st.wYear; |
34 dt->fMonth = SkToU8(st.wMonth); | 34 dt->fMonth = SkToU8(st.wMonth); |
35 dt->fDayOfWeek = SkToU8(st.wDayOfWeek); | 35 dt->fDayOfWeek = SkToU8(st.wDayOfWeek); |
36 dt->fDay = SkToU8(st.wDay); | 36 dt->fDay = SkToU8(st.wDay); |
37 dt->fHour = SkToU8(st.wHour); | 37 dt->fHour = SkToU8(st.wHour); |
38 dt->fMinute = SkToU8(st.wMinute); | 38 dt->fMinute = SkToU8(st.wMinute); |
39 dt->fSecond = SkToU8(st.wSecond); | 39 dt->fSecond = SkToU8(st.wSecond); |
40 } | 40 } |
41 } | 41 } |
| 42 |
| 43 SkMSec SkTime::GetMSecs() |
| 44 { |
| 45 FILETIME ft; |
| 46 LARGE_INTEGER li; |
| 47 GetSystemTimeAsFileTime(&ft); |
| 48 li.LowPart = ft.dwLowDateTime; |
| 49 li.HighPart = ft.dwHighDateTime; |
| 50 __int64 t = li.QuadPart; /* In 100-nanosecond intervals */ |
| 51 return (SkMSec)(t / 10000); /* In milliseconds */ |
| 52 } |
OLD | NEW |