Bug 127571 - Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
Summary: Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-24 11:29 PST by Anders Carlsson
Modified: 2014-01-24 16:49 PST (History)
5 users (show)

See Also:


Attachments
Patch (23.19 KB, patch)
2014-01-24 11:39 PST, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (23.51 KB, patch)
2014-01-24 12:15 PST, Anders Carlsson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-01-24 11:29:33 PST
Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
Comment 1 Anders Carlsson 2014-01-24 11:39:13 PST
Created attachment 222129 [details]
Patch
Comment 2 WebKit Commit Bot 2014-01-24 11:40:54 PST
Attachment 222129 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/StdLibExtras.h:405:  Do not use 'using namespace std::literals::chrono_literals;'.  [build/using_namespace] [4]
ERROR: Source/WTF/wtf/StdLibExtras.h:405:  std::literals::chrono_literals is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2014-01-24 11:46:14 PST
Comment on attachment 222129 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=222129&action=review

> Source/WTF/wtf/StdLibExtras.h:380
> +    namespace literals {
> +        namespace chrono_literals {
> +            CONSTEXPR inline chrono::seconds operator"" _s(unsigned long long s)

We don't usually indent namespace content.

> Source/WebCore/page/Settings.cpp:149
> -static const int layoutScheduleThreshold = 250;
> +static const auto layoutScheduleThreshold = 250_ms;

nice!
Comment 4 Anders Carlsson 2014-01-24 12:15:55 PST
Created attachment 222133 [details]
Patch
Comment 5 WebKit Commit Bot 2014-01-24 12:17:55 PST
Attachment 222133 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/StdLibExtras.h:408:  Do not use 'using namespace std::literals::chrono_literals;'.  [build/using_namespace] [4]
ERROR: Source/WTF/wtf/StdLibExtras.h:408:  std::literals::chrono_literals is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Anders Carlsson 2014-01-24 12:37:20 PST
Committed r162716: <http://trac.webkit.org/changeset/162716>