summaryrefslogtreecommitdiffstats
path: root/base/time_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert r83048 "Removed wchar_t from Time::FromString."maruel@chromium.org2011-04-261-239/+7
| | | | | | | | | | | | This causes regression on KeywordProviderTest.Edit on clang produced executable. TBR=shinyak BUG= TEST= Review URL: http://codereview.chromium.org/6893031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83055 0039d316-1c4b-4281-b951-d872f2087c98
* Removed wchar_t from Time::FromString.shinyak@google.com2011-04-261-7/+239
| | | | | | | | | | | | | Also, some of the test case are moved from pr_time_unittests to time_unittests. BUG=77962 TEST=base_unittests:TimeTest.* Review URL: http://codereview.chromium.org/6903022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83048 0039d316-1c4b-4281-b951-d872f2087c98
* Move platform_thread to base/threading and put in the base namespace. I left abrettw@chromium.org2010-12-311-3/+3
| | | | | | | | | | | stub and "using" declarations in the old location to avoid having to change the entire project at once. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6001010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70342 0039d316-1c4b-4281-b951-d872f2087c98
* Reland http://codereview.chromium.org/4139008, with a differentaa@chromium.org2010-11-181-0/+13
| | | | | | | | | | | | approach to creating version numbers. The old one had troubles with timezones. This one is simpler and better. BUG=49233 TEST=Covered by unit tests Review URL: http://codereview.chromium.org/4471001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66582 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flakey test TimeTicks.HighResNowmbelshe@chromium.org2010-10-201-8/+25
| | | | | | | | | BUG=50291 TEST=<this is the test> Review URL: http://codereview.chromium.org/3919005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63192 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flakey timer test.mbelshe@chromium.org2010-09-301-9/+16
| | | | | | | | | | | | | The goal of the test is to verify that the HighResNow() clock has faster than 15ms precision. Modify the test to not depend on how long Sleep() takes in order to verify this. BUG=50291 TEST=TimeTicks.HighResNow Review URL: http://codereview.chromium.org/3452018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61068 0039d316-1c4b-4281-b951-d872f2087c98
* Mark TimeTicks.HighResNow as flakyasargent@chromium.org2010-07-261-1/+1
| | | | | | | | | BUG=50291 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53719 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flakeyness in the timer test.mbelshe@chromium.org2010-07-121-1/+8
| | | | | | | | | | | | | | | | | | | | There were two problems. First, I changed the API so you need to activate high resolution timers, and that was not getting called. So if nobody else was activating them, the timers were definitely not high resolution anymore. Secondarily, the test was too aggressive. We set the resolution to 1ms (via timeBeginPeriod on windows), which means that we could get up to ~1.5 * 1ms of slop. Without the change, I was getting failures in about 1/800 runs. With the new value (8500ms instead of 9000ms), I get zero failures in 5000 runs before I stopped trying. BUG=none TEST=self Review URL: http://codereview.chromium.org/2927005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52080 0039d316-1c4b-4281-b951-d872f2087c98
* 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