Results 1 to 4 of 4

Thread: Timer in DLL

  1. #1
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Timer in DLL

    Im trying to create a timer within a DLL.

    [pascal]
    procedure TEngineTimer.Init;
    begin
    OnTimer := OnTimerRun;
    MaxFPS := 1000;
    Enabled := True;

    ShowMessage('Timer');
    end;
    [/pascal]

    Problem: When the ShowMessage is visible the timer runs. When I remove the ShowMessage the timer doens't do anything.
    Is this a problem with threads or something?

    (Im using OmegaTimer)
    NecroSOFT - End of line -

  2. #2
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Timer in DLL

    Anyone?
    NecroSOFT - End of line -

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Timer in DLL

    I think you need to have something that they run themselves in their own code. A call to the function to increment the internal value. I know of no known internally running function from a DLL. :?

    Maybe have them place a Necro_Timer; function within their main game loop? Then you can give them Necro_Timer_Start(); and Necro_TimerStop; to manually start and stop the clock.

    Or am I not understanding the method of which you're using the timer?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Timer in DLL

    I could try that. I once created a timer (the default TTimer from delphi) in a dll for a chatterbot. But the omega timer doens't whan't to be placed within a DLL...
    NecroSOFT - End of line -

Bookmarks

Posting Permissions

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