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

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

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 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 LUCI 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 under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be 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
12 import string 12 import string
13 import subprocess 13 import subprocess
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 def get_uptime(): 407 def get_uptime():
408 """Return uptime for Windows 7 and later. 408 """Return uptime for Windows 7 and later.
409 409
410 Excludes sleep time. 410 Excludes sleep time.
411 """ 411 """
412 val = ctypes.c_ulonglong(0) 412 val = ctypes.c_ulonglong(0)
413 if ctypes.windll.kernel32.QueryUnbiasedInterruptTime(ctypes.byref(val)) != 0: 413 if ctypes.windll.kernel32.QueryUnbiasedInterruptTime(ctypes.byref(val)) != 0:
414 return val.value / 10000000. 414 return val.value / 10000000.
415 return 0. 415 return 0.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698