![]() The starting point of the activity is relevant because other activities that ran in parallel can be investigated. ![]() The easiest way to manually deduce when the method started would be to convert 10:13:32:564 into milliseconds, subtract 3367, then convert back to a time. 10:13:32:564 | WARNING Activity X: took 3367ms, more than the 3000ms threshold programming efficiency: in most programming languages you have date/time objects capable of taking milliseconds since Epoch when constructed (which allows for automatic conversion to client-side timezone)Ĭode & architecture become simpler and more flexible when using this approach, which is also sketched below:. ![]() database simplicity: you store a number (milliseconds) rather than complex data structures like DateTimes.architecture clarity: server side works with UTC, client side shows the time through its local timezone.Therefore if you choose to store time as milliseconds since the Unix Epoch you have a lot of benefits: In my experience i found the perfect time-keeping architecture emerges naturally from this: the Unix Epoch is January 1st, 1970, midnight, UTC. It happens not only in Java but in other programming languages as well. Java's Calendar (and deprecated Date) itself stores time as milliseconds since the Unix Epoch.
0 Comments
Leave a Reply. |