Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: base/i18n/time_formatting.h

Issue 2573183002: Add process start time and CPU time columns to task manager (Closed)
Patch Set: Add TODO comment for a bug, which will be addressed in another CL. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Basic time formatting methods. These methods use the current locale 5 // Basic time formatting methods. These methods use the current locale
6 // formatting for displaying the time. 6 // formatting for displaying the time.
7 7
8 #ifndef BASE_I18N_TIME_FORMATTING_H_ 8 #ifndef BASE_I18N_TIME_FORMATTING_H_
9 #define BASE_I18N_TIME_FORMATTING_H_ 9 #define BASE_I18N_TIME_FORMATTING_H_
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Formats a time in a friendly sentence format, e.g. 70 // Formats a time in a friendly sentence format, e.g.
71 // "Monday, March 6, 2008 2:44:30 PM". 71 // "Monday, March 6, 2008 2:44:30 PM".
72 BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time); 72 BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time);
73 73
74 // Formats a time in a friendly sentence format, e.g. 74 // Formats a time in a friendly sentence format, e.g.
75 // "Monday, March 6, 2008". 75 // "Monday, March 6, 2008".
76 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time); 76 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
77 77
78 // Formats a time duration of hours and minutes into various formats, e.g., 78 // Formats a time duration of hours and minutes into various formats, e.g.,
79 // "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details. 79 // "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details.
80 //
81 // Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
82 // can possibly be larger than 24h, as the hour value will be cut below 24
83 // after formatting.
84 // TODO (chengx) fix function output when width = DURATION_WIDTH_NUMERIC
dcheng 2016/12/21 20:45:37 Nit: TODO(chengx): fix function output... is the
chengx 2016/12/21 22:05:54 Done.
85 // (http://crbug.com/675791)
brucedawson 2016/12/21 02:13:40 Maybe skip these comments.
chengx 2016/12/21 22:05:54 I had a quick look on the fix, which turns out to
80 BASE_I18N_EXPORT string16 TimeDurationFormat(const TimeDelta& time, 86 BASE_I18N_EXPORT string16 TimeDurationFormat(const TimeDelta& time,
81 const DurationFormatWidth width); 87 const DurationFormatWidth width);
82 88
89 // Formats a time duration of hours, minutes and seconds into various formats,
90 // e.g., "3:07:30" or "3 hours, 7 minutes, 30 seconds". See DurationFormatWidth
91 // for details.
92 //
93 // Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
94 // can possibly be larger than 24h, as the hour value will be cut below 24
95 // after formatting.
96 // TODO (chengx) fix function output when width = DURATION_WIDTH_NUMERIC
97 // (http://crbug.com/675791)
98 BASE_I18N_EXPORT string16
99 TimeDurationFormatWithSeconds(const TimeDelta& time,
dcheng 2016/12/21 20:45:37 Note that base::Time, base::TimeDelta, base::TimeT
chengx 2016/12/21 22:05:54 Alright, I changed to pass-by-value for the two Ti
100 const DurationFormatWidth width);
101
83 // Gets the hour clock type of the current locale. e.g. 102 // Gets the hour clock type of the current locale. e.g.
84 // k12HourClock (en-US). 103 // k12HourClock (en-US).
85 // k24HourClock (en-GB). 104 // k24HourClock (en-GB).
86 BASE_I18N_EXPORT HourClockType GetHourClockType(); 105 BASE_I18N_EXPORT HourClockType GetHourClockType();
87 106
88 } // namespace base 107 } // namespace base
89 108
90 #endif // BASE_I18N_TIME_FORMATTING_H_ 109 #endif // BASE_I18N_TIME_FORMATTING_H_
OLDNEW
« no previous file with comments | « no previous file | base/i18n/time_formatting.cc » ('j') | chrome/browser/task_manager/sampling/shared_sampler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698