Results 1 to 3 of 3

Thread: Help a noob please!

  1. #1
    Join Date
    Mar 2012
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Help a noob please!

    Ok guys im trying to use the MarkTime function, how do i reset the timer/counter?
    Last edited by Darcy_Oner; 04-06-2013 at 06:59 AM.

  2. #2
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Just re-mark it, MarkTimer(int) or set the int to 0.
    Last edited by Justin; 04-06-2013 at 07:17 AM.

    Forum account issues? Please send me a PM

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Simba Code:
    program ResetTime;

    {$i SRL/SRL.simba}

    Var Timer: Integer;

    begin
      MarkTime(Timer);
      Repeat
        Wait(1000);
        WriteLn('Timer is at ' + IntToStr(TimeFromMark(Timer)) + ' miliseconds');
        If TimeFromMark(Timer) > 5000 Then
        Begin
          Writeln('5 seconds have passed, resetting');
          MarkTime(Timer);
        End;
      Until(False)
    end.

    Example

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •