nsITimelineService is used to constuct a timeline of program execution. The timeline is output to a file, either stderr or the value of the environment variable NS_TIMELINE_LOG_FILE. On the Mac, the timeline is output to the file named "timeline.txt". The reason it's different on the Mac is that the Mac environment initialization code happens after timeline initialization code.
If NS_TIMELINE_INIT_TIME is set in the environment, that will be used as the time of startup; otherwise the current time when mark() is first called will be used.
Mark() is used to put marks on the timeline.
Indent() and outdent() are used to format the timeline a bit to show nesting. This doesn't produce perfect results in the face of asychrony and multiple threads.
Enter() and leave() are convenience functions that add marks to the timeline and do indentation.
StartTimer() and stopTimer() control named stop watches. If startTimer() is called more than once, an equal number of stopTimer() calls are needed to actually stop the timer. This makes these timers slightly useful in a threaded environment.
MarkTimer() puts a mark on the timeline containing the total for the named timer.
This interface is intended to be used as a service.
void enter ( char* text )
void indent ( )
void leave ( char* text )
void mark ( char* text )
void markTimer ( char* timerName )
void markTimerWithComment ( char* timerName , char* comment )
void outdent ( )
void resetTimer ( char* timerName )
void startTimer ( char* timerName )
void stopTimer ( char* timerName )
Enter/leave bracket code with "
Reference documentation is generated from Mozilla's source.