Jump to content




How to set stopwatch and put how long in a varible


  • You cannot reply to this topic
2 replies to this topic

#1 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 31 August 2016 - 10:17 PM

So i want to make a program that will ping one of my CC PC's

and i want to make a stopwatch on how long it takes and save it to a varible

Thank You!

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 31 August 2016 - 10:44 PM

What do you mean by "ping"? If you mean rednet / modem stuff, it's basically instantaneous. However, you'll want to use os.clock for timing things. It returns the current time the computer has been running, so if you call it before and after and do a subtract, you can get the elapsed time.

#3 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 31 August 2016 - 11:46 PM

Thank you for your help! And also i am trying to make a rednet ping to see if my CC Servers are up and running :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users