blob: 0f618af6f7314ea2aa339ba9650e6e66e108e77d [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Note: this test is ported to hardware.HighResTimer Tast test.
# Any change made here should be applied to the one in Tast, too.
import re
from autotest_lib.client.bin import test
from autotest_lib.client.common_lib import error, utils
class platform_HighResTimers(test.test):
version = 1
def check_timers(self):
timer_list = open('/proc/timer_list')
for line in timer_list.readlines():
match ='^\s*\.resolution:\s(\d+)\s*nsecs$', line)
if match:
res = int(
if (res != 1):
raise error.TestError('Timer resolution %d != 1 ns' % res)
def run_once(self):
except error.TestError, e:
raise error.TestFail(e)