getMilliSec - reborn

Hello.

Thanks for the feedback as always Shane! I have downloaded AsObj Explorer by the way.

As for the reference data, yeah, I it would improve the quality somewhat to use the class method, I’m not that concerned with the number of milliseconds I’ll save on that, but I’ll use the class method anyway. :slight_smile:

If milliseconds don’t matter, how about a timer that works in tenths of a second:

use framework "Foundation"
use framework "AppKit"
on showDockBadge:theText
	set theDockTile to current application's NSApp's dockTile()
	theDockTile's setBadgeLabel:theText
	theDockTile's display()
end showDockBadge:

Now run:

use theLib : script "<lib name>" 
repeat with i from 1 to 100
	(theLib's showDockBadge:(i as text))
	delay 0.1
end repeat
theLib's showDockBadge:""

:cool:

Wow! That was utterly cool Shane. :cool:

What I really meant however, is that it isn’t the individual milli seconds that matters, but the proportions between different stuff really, in time. But I am sure I’ll find usage for your “badge” counter. :slight_smile:

Come to think of it, I have had some scripts recently, where iCal almost would have fit the bill as a “badgeCounter” :o