Is there anyway to check the time that has passed from when you call MarkTime?
Is there anyway to check the time that has passed from when you call MarkTime?
Finished B.S. Program in Radiology!!
Projects: A big one! Total secret! hehe
MarkTime(t);
TimeFromMark(t);
![]()
Silly! I know that haha, but I'm looking for a timer....hope I can explains this so it makes sense.
Okay.
Simba Code:MarkTime(Timer);
//Blah blah blah
//more stuff etc
//Want to check the time that has passed up until this point and post it in the debug box
Does that make sense? I just want to mark the time and after it does whatever procedures/functions I want to see how much time has passed since I marked the time.
Finished B.S. Program in Radiology!!
Projects: A big one! Total secret! hehe
Like he said..
Simba Code:MarkTime(C);
Do...
This..
Stuff..
WriteLn(TimeFromMark(C));
~Home
^^^ Wouldn't you have to do IntToStr() ?
Simply a GOD beast...
My Tutorials
Simply a GOD beast...
My Tutorials
Simply a GOD beast...
My Tutorials
Ahh thank you Runaway..you seem to always be helping me haha. Also thanks Home. For some reason I thought it would of been more difficult.
Finished B.S. Program in Radiology!!
Projects: A big one! Total secret! hehe
I use this function which I slightly modified from a code that runaway posted when I asked a similar question a little while back -
Simba Code:procedure TimeStamp(WaitTime: Integer);
var
T: Integer;
Ticker: String;
begin
MarkTime(T);
while (WaitTime > TimeFromMark(T)) do
begin
Wait(500);
Ticker := MsToTime(WaitTime - TimeFromMark(T), Time_Short);
Status('Break remaining: ' + Ticker);
end;
end;
used like this in my script
Simba Code:BreakLength := RandomRange(30000,1200000);//how long the break is
WriteLn('Taking a break for ' + (MsToTime(BreakLength, Time_Short)));
MarkTime(BreakT);//my time mark for the break so to speak
TimeStamp(BreakLength);//Write TimeStamp with the time to countdown in the brackets
repeat
Wait(100);
until (BreakLength < TimeFromMark(BreakT));
Feel free to edit this as you wish to suit your purposes if you'd like, it just writes the time remaining in your status bar
Thanks mate!
Finished B.S. Program in Radiology!!
Projects: A big one! Total secret! hehe
There are currently 1 users browsing this thread. (0 members and 1 guests)