2011-03-30 118 views
0
定时器

我的代码:显示毫秒

myTextBox.text = count1.currentCount.toString(); 

我怎么会显示以毫秒为单位的当前计数?

回答

2

如果你想通过1000 currentCount转换成毫秒,只是乘:

var currentMilliseconds = count1.currentCount * 1000; 

简而言之,1次是1000毫秒。因此,转换:

milliseconds = seconds * 1000; 
seconds = milliseconds * 0.001; 

你的情况:

myTextBox.text = String(count1.currentCount * 1000); 
+0

只是解析对象计时器在文本框中? – DIM3NSION 2011-03-30 22:58:11

+0

抱歉,您希望将count1.currentCount转换为毫秒? – Feltope 2011-03-30 23:00:08

+0

是的,如果多数民众赞成 – DIM3NSION 2011-03-30 23:01:35