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

Unified Diff: telemetry/third_party/web-page-replay/script_injector.py

Issue 2555943002: Update web-page-replay to the latest commit (Closed)
Patch Set: 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 | « telemetry/third_party/web-page-replay/httpclient_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/third_party/web-page-replay/script_injector.py
diff --git a/telemetry/third_party/web-page-replay/script_injector.py b/telemetry/third_party/web-page-replay/script_injector.py
index 8f272e6bf3b0831ad1e96a292cef8f1decbde66f..d8452337b4a3078a218bdfd240ed2cf74d88dd50 100644
--- a/telemetry/third_party/web-page-replay/script_injector.py
+++ b/telemetry/third_party/web-page-replay/script_injector.py
@@ -53,8 +53,9 @@ def GetScriptInjector(scripts):
script_template = jsmin.jsmin(''.join(lines), quote_chars="'\"`")
def injector(record_time):
- js_timestamp = int((record_time - datetime.datetime(1970, 1, 1))
- .total_seconds()) * 1000
+ delta = record_time - datetime.datetime(1970, 1, 1)
+ js_timestamp = \
+ int(delta.total_seconds()) * 1000 + delta.microseconds / 1000
return script_template.replace(TIME_SEED_MARKER, str(js_timestamp))
return injector
« no previous file with comments | « telemetry/third_party/web-page-replay/httpclient_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698