Hi I would like to include in my detailed log of app the time stamp with milliseconds when a VerboseLog() handler is called.
At the moment I can write something like YYYYMMDD-HHMMSS but i miss the milliseconds.
Anyone has a solution using pure AppleScript or Asoc?
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
set now to current application's class "NSDate"'s |date|()
set dateFormatter to current application's class "NSDateFormatter"'s new()
tell dateFormatter to setDateFormat:("yyyyMMdd-HHmmss.SSS")
set timeStamp to (dateFormatter's stringFromDate:(now)) as text
However, I don’t imagine the clock on your computer will be that accurately set.