Recent

Author Topic: What's up with PtcCrt's delay procedure?  (Read 760 times)

TBMan

  • Full Member
  • ***
  • Posts: 124
What's up with PtcCrt's delay procedure?
« on: February 02, 2025, 07:48:08 pm »
It just acts wonky at times. I've resorted to using a longint as a timer for certain things.

TRon

  • Hero Member
  • *****
  • Posts: 4329
Re: What's up with PtcCrt's delay procedure?
« Reply #1 on: February 03, 2025, 09:02:39 pm »
tbh I never use delay so can't say I am familiar with the issue. I use sleep and timers when working with PTC.

Could you share a reproducible example ?
Today is tomorrow's yesterday.

Thaddy

  • Hero Member
  • *****
  • Posts: 16820
  • Ceterum censeo Trump esse delendam
Re: What's up with PtcCrt's delay procedure?
« Reply #2 on: February 04, 2025, 08:58:19 am »
The description you gave is not very helpful.
I am missing a compilable example, platform, bitness.
ptc has many lowlevel implementations and these differ per platform, e.g. on Win and Lin the behavior is different in some cases.
« Last Edit: February 04, 2025, 09:08:42 am by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

Thaddy

  • Hero Member
  • *****
  • Posts: 16820
  • Ceterum censeo Trump esse delendam
Re: What's up with PtcCrt's delay procedure?
« Reply #3 on: February 04, 2025, 09:31:42 am »
Also note that on most platforms delays should not be used as precision timers: they just guarantee a minimum delay() but otherwise have no priority.
You need OS timers for that.
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

TBMan

  • Full Member
  • ***
  • Posts: 124
Re: What's up with PtcCrt's delay procedure?
« Reply #4 on: February 09, 2025, 10:07:17 pm »
It just seems to be inconsistent in its use. Maybe it's my system. Sometimes
Code: Pascal  [Select][+][-]
  1. Delay(10)
  2.  

takes forever and it shouldn't. It's probably my usage of it (in loops at times). Thanks for the responses.

 

TinyPortal © 2005-2018