delphistopwatchsystem.diagnosticstms-web-core

Can't find unit "System.Diagnostics" in TMS WEB Core


I'm trying to use TStopwatch from the System.Diagnostics unit, but it's not finding it. I'm getting the following error:

[Error] can't find unit "System.Diagnostics"

I know most of the common Delphi units either work out of the box in TMS WEB Core or have a wrapper unit for it.

What about System.Diagnostics and TStopwatch? Is there a TMS WEB Core version of this?


I tried searching for "TMS WEB Core System.Diagnostics" and "TMS WEB Core TStopwatch" on Google and Bing, but couldn't find anything.


Solution

  • I ended up finding a WEBLib.Diagnostics unit in the "Core Source" folder for TMS WEB Core that has a TStopwatch record in it.

    So if you want to use the TStopwatch in TMS WEB Core using Delphi, then you need to include the WEBLib.Diagnostics unit into your uses list instead of System.Diagnostics.