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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/i18n/time_formatting.cc » ('j') | chrome/browser/task_manager/sampling/shared_sampler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/time_formatting.h
diff --git a/base/i18n/time_formatting.h b/base/i18n/time_formatting.h
index 761dd98a5d427e8441b7b17405be2dcb39933a6b..e01e58e0c47ce95d324575c624e19efeb4eef833 100644
--- a/base/i18n/time_formatting.h
+++ b/base/i18n/time_formatting.h
@@ -77,9 +77,28 @@ BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
// Formats a time duration of hours and minutes into various formats, e.g.,
// "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details.
+//
+// Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
+// can possibly be larger than 24h, as the hour value will be cut below 24
+// after formatting.
+// 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.
+// (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
BASE_I18N_EXPORT string16 TimeDurationFormat(const TimeDelta& time,
const DurationFormatWidth width);
+// Formats a time duration of hours, minutes and seconds into various formats,
+// e.g., "3:07:30" or "3 hours, 7 minutes, 30 seconds". See DurationFormatWidth
+// for details.
+//
+// Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
+// can possibly be larger than 24h, as the hour value will be cut below 24
+// after formatting.
+// TODO (chengx) fix function output when width = DURATION_WIDTH_NUMERIC
+// (http://crbug.com/675791)
+BASE_I18N_EXPORT string16
+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
+ const DurationFormatWidth width);
+
// Gets the hour clock type of the current locale. e.g.
// k12HourClock (en-US).
// k24HourClock (en-GB).
« 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