aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UTime.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-30 18:12:06 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-30 18:12:06 +0000
commit5f11f9f3e328f6818a42f0a3405404612399c64e (patch)
tree66f4cfcde3c1d4b0564ba47aceeb2d04082a7dfb /Game/Code/Classes/UTime.pas
parentd4ec88adaa7a93d1970c116ae3d621ff05683681 (diff)
downloadusdx-5f11f9f3e328f6818a42f0a3405404612399c64e.tar.gz
usdx-5f11f9f3e328f6818a42f0a3405404612399c64e.tar.xz
usdx-5f11f9f3e328f6818a42f0a3405404612399c64e.zip
Removed outdated 1.1 branch contents
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.1@1331 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UTime.pas102
1 files changed, 0 insertions, 102 deletions
diff --git a/Game/Code/Classes/UTime.pas b/Game/Code/Classes/UTime.pas
deleted file mode 100644
index 3b7749a2..00000000
--- a/Game/Code/Classes/UTime.pas
+++ /dev/null
@@ -1,102 +0,0 @@
-unit UTime;
-
-interface
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-{$I switches.inc}
-
-{$UNDEF DebugDisplay}
-
-type
- TTime = class
- constructor Create;
- function GetTime: real;
- end;
-
-procedure CountSkipTimeSet;
-procedure CountSkipTime;
-procedure CountMidTime;
-
-var
- USTime: TTime;
-
- TimeNew: int64;
- TimeOld: int64;
- TimeSkip: real;
- TimeMid: real;
- TimeMidTemp: int64;
-
-implementation
-
-uses
-// sysutils,
- sdl,
- ucommon;
-
-const
- cSDLCorrectionRatio = 1000;
-
-(*
-BEST Option now ( after discussion with whiteshark ) seems to be to use SDL
-timer functions...
-
-SDL_delay
-SDL_GetTicks
-http://www.gamedev.net/community/forums/topic.asp?topic_id=466145&whichpage=1%EE%8D%B7
-*)
-
-
-constructor TTime.Create;
-begin
- CountSkipTimeSet;
-end;
-
-
-procedure CountSkipTimeSet;
-begin
- TimeNew := SDL_GetTicks();
-
- {$IFDEF DebugDisplay}
- Writeln( 'CountSkipTimeSet : ' + inttostr(trunc(TimeNew)) );
- {$ENDIF}
-end;
-
-
-procedure CountSkipTime;
-begin
- TimeOld := TimeNew;
- TimeNew := SDL_GetTicks();
- TimeSkip := (TimeNew-TimeOld) / cSDLCorrectionRatio;
-
- {$IFDEF DebugDisplay}
- Writeln( 'TimeNew : ' + inttostr(trunc(TimeNew)) );
- Writeln( 'CountSkipTime : ' + inttostr(trunc(TimeSkip)) );
- {$ENDIF}
-end;
-
-
-procedure CountMidTime;
-begin
- TimeMidTemp := SDL_GetTicks();
- TimeMid := (TimeMidTemp - TimeNew) / cSDLCorrectionRatio;
-
- {$IFDEF DebugDisplay}
- Writeln( 'TimeNew : ' + inttostr(trunc(TimeNew)) );
- Writeln( 'CountMidTime : ' + inttostr(trunc(TimeMid)) );
- {$ENDIF}
-end;
-
-
-function TTime.GetTime: real;
-begin
- Result := SDL_GetTicks() / cSDLCorrectionRatio;
-
- {$IFDEF DebugDisplay}
- Writeln( 'GetTime : ' + inttostr(trunc(Result)) );
- {$ENDIF}
-end;
-
-
-end.