|
@@ -18,7 +18,11 @@ unit syncobjs;
|
|
interface
|
|
interface
|
|
|
|
|
|
uses
|
|
uses
|
|
- sysutils,system.timespan;
|
|
|
|
|
|
+ sysutils
|
|
|
|
+ {$IFNDEF VER3_2}
|
|
|
|
+ ,system.timespan
|
|
|
|
+ {$ENDIF}
|
|
|
|
+ ;
|
|
|
|
|
|
type
|
|
type
|
|
PSecurityAttributes = Pointer;
|
|
PSecurityAttributes = Pointer;
|
|
@@ -68,7 +72,9 @@ type
|
|
constructor Create(UseComWait : Boolean=false);
|
|
constructor Create(UseComWait : Boolean=false);
|
|
destructor Destroy; override;
|
|
destructor Destroy; override;
|
|
function WaitFor(Timeout : Cardinal=INFINITE) : TWaitResult;overload;
|
|
function WaitFor(Timeout : Cardinal=INFINITE) : TWaitResult;overload;
|
|
|
|
+ {$IFNDEF VER3_2}
|
|
function WaitFor(const Timeout : TTimespan) : TWaitResult;overload;
|
|
function WaitFor(const Timeout : TTimespan) : TWaitResult;overload;
|
|
|
|
+ {$ENDIF}
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
class function WaitForMultiple(const HandleObjs: THandleObjectArray; Timeout: Cardinal; AAll: Boolean; out SignaledObj: THandleObject; UseCOMWait: Boolean = False; Len: Integer = 0): TWaitResult;
|
|
class function WaitForMultiple(const HandleObjs: THandleObjectArray; Timeout: Cardinal; AAll: Boolean; out SignaledObj: THandleObject; UseCOMWait: Boolean = False; Len: Integer = 0): TWaitResult;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
@@ -243,10 +249,12 @@ begin
|
|
{$ENDIF OS2}
|
|
{$ENDIF OS2}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$IFNDEF VER3_2}
|
|
function THandleObject.WaitFor(const Timeout: TTimespan): TWaitResult;
|
|
function THandleObject.WaitFor(const Timeout: TTimespan): TWaitResult;
|
|
begin
|
|
begin
|
|
result:=waitfor(round(timeout.TotalMilliseconds));
|
|
result:=waitfor(round(timeout.TotalMilliseconds));
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF}
|
|
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
class function THandleObject.WaitForMultiple(const HandleObjs: THandleObjectArray; Timeout: Cardinal; AAll: Boolean; out SignaledObj: THandleObject; UseCOMWait: Boolean = False; Len: Integer = 0): TWaitResult;
|
|
class function THandleObject.WaitForMultiple(const HandleObjs: THandleObjectArray; Timeout: Cardinal; AAll: Boolean; out SignaledObj: THandleObject; UseCOMWait: Boolean = False; Len: Integer = 0): TWaitResult;
|