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

Side by Side Diff: appengine/swarming/swarming_bot/api/platforms/win.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 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
OLDNEW
1 # Copyright 2015 The Swarming Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Windows specific utility functions.""" 5 """Windows specific utility functions."""
6 6
7 import ctypes 7 import ctypes
8 import logging 8 import logging
9 import os 9 import os
10 import platform 10 import platform
11 import re 11 import re
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 def get_uptime(): 405 def get_uptime():
406 """Return uptime for Windows 7 and later. 406 """Return uptime for Windows 7 and later.
407 407
408 Excludes sleep time. 408 Excludes sleep time.
409 """ 409 """
410 val = ctypes.c_ulonglong(0) 410 val = ctypes.c_ulonglong(0)
411 if ctypes.windll.kernel32.QueryUnbiasedInterruptTime(ctypes.byref(val)) != 0: 411 if ctypes.windll.kernel32.QueryUnbiasedInterruptTime(ctypes.byref(val)) != 0:
412 return val.value / 10000000. 412 return val.value / 10000000.
413 return 0. 413 return 0.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698