Simple Timer Class

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Usage)
m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
by [http://www.psychicparrot.ca] psychicparrot
+
{{stub}}
 +
 
 +
by psychicparrot
  
 
== Usage ==
 
== Usage ==
timerRef.startTimer() - kick things off(!)
+
Save the script below as 'Timer.cs'
timerRef.stopTimer() - pause time
+
timerRef.resetTimer() - reset time to zero
+
timerRef.getFormattedTime() - returns formatted string
+
  
=====Description=====
+
Timer timerRef=new(Timer); // <--creates instance of the timer class
A simple timer class, with standard game-like time string formatting!
+
 
 +
timerRef.startTimer(); // <- kick things off(!)
 +
 
 +
timerRef.stopTimer(); //<- pause time
 +
 
 +
timerRef.resetTimer(); // <- reset time to zero
 +
 
 +
timerRef.getFormattedTime() - returns formatted string

Latest revision as of 17:57, 7 December 2012

This article is a stub.

You can help UnifyWiki by expanding it.


by psychicparrot

[edit] Usage

Save the script below as 'Timer.cs'

Timer timerRef=new(Timer); // <--creates instance of the timer class

timerRef.startTimer(); // <- kick things off(!)

timerRef.stopTimer(); //<- pause time

timerRef.resetTimer(); // <- reset time to zero

timerRef.getFormattedTime() - returns formatted string

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox