summaryrefslogtreecommitdiffstats
path: root/base/time.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert r83048 "Removed wchar_t from Time::FromString."maruel@chromium.org2011-04-261-8/+5
| | | | | | | | | | | | 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-5/+8
| | | | | | | | | | | | | 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
* Fix Time::FromDoubleT so that it will return null time when 0 is passed.jianli@chromium.org2010-09-091-0/+9
| | | | | | | | | | | | This is the rework of this issue before previous submit is reverted. We need to fix the usage of Time::FromDoubleT(0) in extension history API. BUG=none TEST=non Review URL: http://codereview.chromium.org/3295001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58953 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 58091 - experiment to try and fix 'Cookies' test on Linux.tim@chromium.org2010-08-311-2/+0
| | | | | | | | | | | | | | Fix Time::FromDoubleT so that it will return null time when 0 is passed. BUG=none TEST=none Review URL: http://codereview.chromium.org/3175044 TBR=jianli@chromium.org Review URL: http://codereview.chromium.org/3262012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58103 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Time::FromDoubleT so that it will return null time when 0 is passed.jianli@chromium.org2010-08-311-0/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3175044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58091 0039d316-1c4b-4281-b951-d872f2087c98
* Header cleanup in base.brettw@chromium.org2010-08-171-1/+0
| | | | | | | | | | | | | | This makes uses of StringPrintf and friends use the base namespace and include stringprintf.h explicitly. This also removes a bunch of unnecessary string_util includes (which exposed a few other errors like people forgetting to include <vector>. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3119022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56446 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug with parsing ftp directory listing lines.michaeln@chromium.org2010-07-271-0/+16
| | | | | | | | | BUG=49997 TEST=ftp_directory_listing_parser_windows_unittest.cc Review URL: http://codereview.chromium.org/3013029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53747 0039d316-1c4b-4281-b951-d872f2087c98
* This is a second attempt at submitting this changelist. The original one wasmarkus@chromium.org2009-10-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://codereview.chromium.org/196053 It turns out, since none of our tests abstract time correctly, unittests are very sensitive to subtle changes in timing. This made some of the valgrind tests on Linux fail, and unfortunately, neither my desktop nor the trybots could reproduce the problem reliably. As far as I can tell, all the (design) bugs are in the unittests. The browser is actually fine. Tweaked the code a little more. Will resubmit and carefully monitor the buildbots. Original change description follows: When converting between units of time or data types of different precision, we have to be careful to consistently round in the same direction. Timeout checks usually check if Now() is less or equal to a deadline in order to determine if a timeout has occurred. This correctly handles the case where actual sleep times are equal or longer than requested sleep times. But if we round down when setting the sleep delay, this can result in unnecessary and expensive looping. Make sure, we always round up when converting to a format with less precision. BUG=none TEST=none Review URL: http://codereview.chromium.org/257044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28801 0039d316-1c4b-4281-b951-d872f2087c98
* Roll back Markus's CL ( http://codereview.chromium.org/196053)jshin@chromium.org2009-09-251-5/+0
| | | | | | | | | BUG=none TEST=UI test and valgrind test pass TBR=markus Review URL: http://codereview.chromium.org/222031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27160 0039d316-1c4b-4281-b951-d872f2087c98
* When converting between units of time or data types of different precision,markus@chromium.org2009-09-241-0/+5
| | | | | | | | | | | | | | | | | | | we have to be careful to consistently round in the same direction. Timeout checks usually check if Now() is less or equal to a deadline in order to determine if a timeout has occurred. This correctly handles the case where actual sleep times are equal or longer than requested sleep times. But if we round down when setting the sleep delay, this can result in unnecessary and expensive looping. Make sure, we always round up when converting to a format with less precision. BUG=none TEST=none Review URL: http://codereview.chromium.org/196053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27146 0039d316-1c4b-4281-b951-d872f2087c98
* Make int64 -> Time conversion explicit.phajdan.jr@chromium.org2009-09-141-4/+5
| | | | | | | | | | | Landing Patch for Jacob Mandelson, original review: http://codereview.chromium.org/200093 BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/205003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26134 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-5/+4
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-4/+5
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* - Added support for keeping track of load times.davemoore@chromium.org2009-04-031-0/+6
| | | | | | | | | | | | | | | | | For each document loaded we record the time the page was requested by the user (or as close as we can get to that), the time the load process started, the time the document and it's dependent resources (scripts) have been loaded (before onload()) and the time all the document's resources have been loaded. We use this data for two things: 1) We histogram the deltas between the time marks 2) We expose the times to javascript running on the page which was loaded Review URL: http://codereview.chromium.org/42527 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13116 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds macro used to track the creation and destructionjcampan@chromium.org2009-02-041-1/+2
| | | | | | | | | | | of HWNDs, in an attempt to detect potential double-delete. A double-delete of a HWND might be responsible for the crasher http://crbug.com/4714 Note: this CL was previously committed and reverted because it broke the sandbox integration module. Review URL: http://codereview.chromium.org/21032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9161 0039d316-1c4b-4281-b951-d872f2087c98
* Inline the TimeDelta::From* construction functions.deanm@chromium.org2009-01-131-30/+0
| | | | | | | | | With GCC, we don't have much hope of inlining unless the defintion is in the header. This should also hopefully allow the compiler to do things like constant folding on the multiplications, etc. Review URL: http://codereview.chromium.org/17802 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7928 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+3
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use the Windows high-resolution Time::Now hacks on Posix, the normal ↵deanm@chromium.org2008-09-111-48/+0
| | | | | | | | resultion from the time APIs there should be enough. Review URL: http://codereview.chromium.org/2420 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2056 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-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1024 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+190
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98