Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: src/ports/SkTime_win.cpp

Issue 1422513003: SkTime::GetNSecs() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: #else std::chrono Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ports/SkTime_Unix.cpp ('k') | tools/timer/GpuTimer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/ports/SkTime_Unix.cpp ('k') | tools/timer/GpuTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698