Discussion:
[chromium-dev] How can I convert "elapsed" TimeDelta to Microsecond?
m***@gmail.com
2018-11-03 18:28:26 UTC
Permalink
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2fe302c8-2b95-4054-88f7-751a3b80d2b8%40chromium.org.
'Josh Pratt' via Chromium-dev
2018-11-04 22:38:17 UTC
Permalink
Would ToJsTime fit your needs?
Sounds like the -1 is an error code but I don't know more, sorry.

https://cs.chromium.org/chromium/src/base/time/time.h?l=548

"""

// Converts to/from the Javascript convention for times, a number of
// milliseconds since the epoch: //
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime
<https://www.google.com/url?q=https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime>.
static Time <https://cs.chromium.org/chromium/src/base/time/time.h?l=451&ct=xref_jump_to_def&gsn=Time>
FromJsTime <https://cs.chromium.org/chromium/src/base/time/time.h?l=569&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%253Froot%253Dchromium-chromeos%2523ci8AFR5BouEBlDSjiknzlxt5nHNzSMXU%25252FwLO8gk2ooQ%25253D&gsn=FromJsTime&ct=xref_usages>(double
ms_since_epoch <https://cs.chromium.org/chromium/src/base/time/time.h?l=569&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%253Froot%253Dchromium-chromeos%2523yH5IAAgNgiIpZQeiWkmFytkHa1QZkYu1gQnnsndlfQM%25253D&gsn=ms_since_epoch&ct=xref_usages>);
double ToJsTime
<https://cs.chromium.org/chromium/src/base/time/time.h?l=570&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%253Froot%253Dchromium-chromeos%2523680RNupbOw8ZwG%25252BUyesLgcYWeQgkWotU14G9boFtd%25252BY%25253D&gsn=ToJsTime&ct=xref_usages>()
const;
"""
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2fe302c8-2b95-4054-88f7-751a3b80d2b8%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2fe302c8-2b95-4054-88f7-751a3b80d2b8%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAGnQCYKeKbtvRnrFQJ2nVCwBFXBnApwEnvwoNj6%2B%2BG3V2HBTtQ%40mail.gmail.com.
m***@gmail.com
2018-11-06 16:50:03 UTC
Permalink
The function "ToJsTime" is a part of Time not TimeDelta and so I cannot use
it for elapsed.
Post by 'Josh Pratt' via Chromium-dev
Would ToJsTime fit your needs?
Sounds like the -1 is an error code but I don't know more, sorry.
https://cs.chromium.org/chromium/src/base/time/time.h?l=548
"""
// Converts to/from the Javascript convention for times, a number of // milliseconds since the epoch: // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime <https://www.google.com/url?q=https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime>. static Time <https://cs.chromium.org/chromium/src/base/time/time.h?l=451&ct=xref_jump_to_def&gsn=Time> FromJsTime <https://cs.chromium.org/chromium/src/base/time/time.h?l=569&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%253Froot%253Dchromium-chromeos%2523ci8AFR5BouEBlDSjiknzlxt5nHNzSMXU%25252FwLO8gk2ooQ%25253D&gsn=FromJsTime&ct=xref_usages>(double ms_since_epoch <https://cs.chromium.org/chromium/src/base/time/time.h?l=569&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%253Froot%253Dchromium-chromeos%2523yH5IAAgNgiIpZQeiWkmFytkHa1QZkYu1gQnnsndlfQM%25253D&gsn=ms_since_epoch&ct=xref_usages>); double ToJsTime <https://cs.chromium.org/chromium/src/base/time/time.h?l=570&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%253Froot%253Dchromium-chromeos%2523680RNupbOw8ZwG%25252BUyesLgcYWeQgkWotU14G9boFtd%25252BY%25253D&gsn=ToJsTime&ct=xref_usages>() const;
"""
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2fe302c8-2b95-4054-88f7-751a3b80d2b8%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/2fe302c8-2b95-4054-88f7-751a3b80d2b8%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/37a19046-773f-4adf-a0ec-c950adf00190%40chromium.org.
k***@chromium.org
2018-11-05 13:48:46 UTC
Permalink
I'm not sure what "functions to convert to different time units" you tried
exactly but either elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41> should
work.

Kyle
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/bf26f870-048b-40eb-b668-83fefbff9871%40chromium.org.
m***@gmail.com
2018-11-06 16:53:08 UTC
Permalink
I tried all of them such as those two functions you mentioned but I receive
-1 when I call elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
.
Post by k***@chromium.org
I'm not sure what "functions to convert to different time units" you tried
exactly but either elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41> should
work.
Kyle
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org.
Greg Thompson
2018-11-07 09:20:49 UTC
Permalink
This may be a silly question, but have you looked at the actual value of
|elapsed| in your case? If using a debugger to reach into its delta_ member
is too cumbersome, you can use ToInternalValue() to get it.
Post by m***@gmail.com
I tried all of them such as those two functions you mentioned but I
receive -1 when I call elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
.
Post by k***@chromium.org
I'm not sure what "functions to convert to different time units" you
tried exactly but either elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41> should
work.
Kyle
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAKQnr0QJJjG0gA%2B%2B8epR%2BZUWs9p-7osR%2BstUL_roMQ0t-nUGQA%40mail.gmail.com.
m***@gmail.com
2018-11-07 15:10:10 UTC
Permalink
This method had been used. The output is -1. I answered your claims in a
separate email.
Post by Greg Thompson
This may be a silly question, but have you looked at the actual value of
|elapsed| in your case? If using a debugger to reach into its delta_ member
is too cumbersome, you can use ToInternalValue() to get it.
Post by m***@gmail.com
I tried all of them such as those two functions you mentioned but I
receive -1 when I call elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
.
Post by k***@chromium.org
I'm not sure what "functions to convert to different time units" you
tried exactly but either elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41> should
work.
Kyle
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4c1c30cc-ebec-41e4-9c89-8335fcbf0c82%40chromium.org.
Greg Thompson
2018-11-07 15:16:41 UTC
Permalink
Okay, so the question is not how to convert |elapsed| to microseconds, but
rather why is |elapsed| equal to -1, no? I would suggest stepping into the
call to navigator->GetCurrentLoadStart(). If it simply
returns base::TimeTicks::Now(), then what you're observing is that the
difference between two successive calls is one single tick. I hope this
helps.
Post by m***@gmail.com
This method had been used. The output is -1. I answered your claims in a
separate email.
Post by Greg Thompson
This may be a silly question, but have you looked at the actual value of
|elapsed| in your case? If using a debugger to reach into its delta_ member
is too cumbersome, you can use ToInternalValue() to get it.
Post by m***@gmail.com
I tried all of them such as those two functions you mentioned but I
receive -1 when I call elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
.
Post by k***@chromium.org
I'm not sure what "functions to convert to different time units" you
tried exactly but either elapsed.InMillisecondsF()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=195&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41>
or elapsed.InMicroseconds()
<https://cs.chromium.org/chromium/src/base/time/time.h?l=198&rcl=1de836531d5503fa01ebaac9882f39363a0c7d41> should
work.
Kyle
Post by m***@gmail.com
I need to analyze elapsed
<https://cs.chromium.org/chromium/src/content/browser/web_contents/web_contents_impl.cc?l=5640&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fcontent%252Fbrowser%252Fweb_contents%252Fweb_contents_impl.cc%2523ttArHNE92StvcsbGEYRdH51JI7YHRjZYC6hFcWX0tMY%25253D&gsn=elapsed&ct=xref_usages> in
Microsecond or even Millisecond. When I use the functions to convert to
different time units in TimeDelta
<https://cs.chromium.org/chromium/src/base/time/time.h?l=109&gs=kythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%25236SU%25252Ffo9OsTRKujYLg79r3LyDyCrPTmTO4XV0epZ6gIA%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523EeGvTfdI1UYrXTEMRuTDrYTzOdm2TrvtSRQGat67emg%25253D%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523TimeDelta%25253Abase%252523c%252523o9uo3pe5Hsk%2Bkythe%253A%252F%252Fchromium%253Flang%253Dc%25252B%25252B%253Fpath%253Dsrc%252Fbase%252Ftime%252Ftime.h%2523dJqYAS%25252FgeLBQ9okwQW0XFkftj5FVY4ASPIJzqxi2dGM%25253D&gsn=TimeDelta&ct=xref_usages>,
I receive -1 as the output! Any idea?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b95e69fa-0c2d-44d4-9d87-78cee52d9605%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4c1c30cc-ebec-41e4-9c89-8335fcbf0c82%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4c1c30cc-ebec-41e4-9c89-8335fcbf0c82%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAKQnr0TwTZBq7tgdJMvOP9bTL4Swc7AEc_L%2Ba3m8AYxE-pPjrQ%40mail.gmail.com.
Loading...