summaryrefslogtreecommitdiffstats
path: root/base/time_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make ProcessWatcher use kqueues on Mac.jeremy@chromium.org2009-12-151-0/+21
| | | | | | | | | | | | | * Port ProcessWatcher::EnsureProcessTerminated() to kqueue() APIs on OS X. * Make ProcessWatcher::EnsureProcessGetsReaped() Linux-only, since it's only used there. * Add a unit test. BUG=12731 TEST=Open Chrome/Mac, open and close a few tabs. Processes shouldn't stay around. Review URL: http://codereview.chromium.org/496007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34547 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce number of iterations on TimeTicks.Deltas testmbelshe@google.com2009-12-031-1/+1
| | | | | | | | | | | so that unittests run faster. BUG=22061 TEST=this is the test Review URL: http://codereview.chromium.org/462010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33631 0039d316-1c4b-4281-b951-d872f2087c98
* Convert internal time format to Windows 1601 epoch on Linux & Mac.brettw@chromium.org2009-08-261-4/+26
| | | | | | | | | | | Although we represent time internally starting from 1601, there are still things like time explosion that will not work before the year 1900. This limitation is the same as it was previously. BUG=14734 Review URL: http://codereview.chromium.org/173296 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24417 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+4
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Change to Hi Res timers on Windows.mbelshe@google.com2008-09-261-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two parts of this: 1) TimeTicks:Now() Don't call timeBeginPeriod() in all cases. Use the new SystemMonitor class to watch battery on/off transitions and use the timeBeginPeriod() only when we're using the battery. 2) TimeTicks::UnreliableHiResNow() Change this function from "UnreliableHiResNow()" to "HiResNow()". We still use QPC, but we detect if we're on AMD Athlon XP machines which fail on QPC. For those systems, we fall back to TimeTicks::Now(). Updated tests to detect hardware specifics of timers. Output of the test will contain lines such as these: [ RUN ] TimeTicks.SubMillisecondTimers Min timer is: 1us [ OK ] TimeTicks.SubMillisecondTimers [ RUN ] TimeTicks.TimeGetTimeCaps timeGetTime range is 1 to 1000000ms [ OK ] TimeTicks.TimeGetTimeCaps [ RUN ] TimeTicks.QueryPerformanceFrequency QueryPerformanceFrequency is 2394.18MHz [ OK ] TimeTicks.QueryPerformanceFrequency [ RUN ] TimeTicks.TimerPerformance Time::Now: 0.11us per call TimeTicks::Now: 0.09us per call TimeTicks::HighResNow: 0.26us per call [ OK ] TimeTicks.TimerPerformance Review URL: http://codereview.chromium.org/4092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2625 0039d316-1c4b-4281-b951-d872f2087c98
* Add at least some code that tests UnreliableHighResNow. I realize it can be ↵deanm@google.com2008-09-031-0/+8
| | | | | | broken, but we should test it if we're going to have the code. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1685 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup some Windows TimeTicks functions. Move TickTicks::Now and ↵deanm@google.com2008-09-021-107/+2
| | | | | | | | TicksTicks::UnreliableHighResNow to Singletons, which cleans up the code and removes some possible unsafe cross-thread access. Move the Windows-specific rollover tests to time_unittests_win. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1633 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests for From / In converions and LocalMidnight. Add InMinutes().deanm@google.com2008-08-191-2/+33
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1024 0039d316-1c4b-4281-b951-d872f2087c98
* including build/build_config to fix bustagepinkerton@google.com2008-08-131-0/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@843 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on most tests for posix.pinkerton@google.com2008-08-131-2/+16
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@839 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+195
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98