You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Andrej van der Zee (Bug 51527):
In my test scenario I need get the current Epoch timestamp in an HTTP request parameter. I had to write a custom function, but maybe it would be a better idea to expand the __time() function to include epoch time in seconds and/or milliseconds since 1970/1/1 00:00:00.
OS: All
The text was updated successfully, but these errors were encountered:
Sebb (migrated from Bugzilla):
The __time() function already provides the current time in milliseconds - just omit the format parameter, and it returns the output from System.currentTimeMillis().
Is that what you meant?
It might still be useful to add support for returning the time in seconds as well.
Andrej van der Zee (migrated from Bugzilla):
Uhhh yes you are right. I guess I did not read the documentation well enough, it already provides a millisecond representation. I usually scan-read documentation and the millisec-option is not provided in the format-list, but instead mentioned separately. I guess that is why I missed it.
In my test case, I do need an Epoch in seconds, as you mentioned. To this end, it would be useful to add another option to __time() to provide seconds since 1970/00/00 00:00:00, as you mentioned. In my test plan, I need to send the current time in seconds for many HTTP request. Starting the Java interpreter in order to convert millisec to second is just a waist of CPU cycles.
Andrej van der Zee (Bug 51527):
In my test scenario I need get the current Epoch timestamp in an HTTP request parameter. I had to write a custom function, but maybe it would be a better idea to expand the __time() function to include epoch time in seconds and/or milliseconds since 1970/1/1 00:00:00.
OS: All
The text was updated successfully, but these errors were encountered: