Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

$= (elapsed time) in PROMPT always shows 0.000 in TCC 35/36

Aug
23
0
The $= prompt metacharacter ("elapsed time since the previous command was started") always shows 0.000 in TCC 35 and 36. It worked in TCC 28.

Versions:
  • Works: TCC 28.02.18 x64
  • Broken: TCC 35 and TCC 36.52.88 x64
  • Windows 11 [Version 10.0.26200.9457]

Clean reproduction: launched from cmd.exe (not from TCC, so nothing is inherited), with an empty INI file and a TCSTART path pointing to an empty directory. No aliases are defined and the prompt is a bare $=.

Code:
C:\Users\SigmundVik>C:\tools\JPSoft\TCC36\tcc.exe @C:\tools\JPSoft\TCC36\empty.ini //TCStartPath=C:\tools\JPSoft\TCC36\nostart

TCC  36.52.88 x64   Windows 11 [Version 10.0.26200.9457]

C:\Users\SigmundVik>alias ll
TCC: Not an alias "ll"

C:\Users\SigmundVik>prompt=$=

0.000timeout 3

Waiting for 0 seconds, press a key to continue ...

0.000

Expected: about 3.000 after "timeout 3". With TCC 28.02.18, the same test shows 2.504.

The duration is measured correctly internally, because the history log records it:

Code:
tail /n 1 "C:\ProgramData\JP Software\XHistory36"
2026-10-01 10:17:28|2.745|0|C:\tools\JPSoft\TCC36|timeout 3

So it looks like only the value $= reads is wrong: it is either reset before the prompt is displayed or never updated.

This is not the same issue as the TCC 25 locale formatting bug in thread 9909 (fixed in 25.0.17). The formatting is fine here, the value is just always zero.
 
I can replicate this. Doing something time-consuming, like dir /a /s c:\windows\system32\, reports 0.000 when the command exits normally. But, if I use Ctrl-C to abort, I do see a reasonable value.
 
Hmmm! After set prompt=$= and dir /s d:\ I get

Code:
    Total for:  D:\
     100,384,894,655 bytes in 423,795 files and 135,358 dirs    101,565,739,008 bytes allocated
     406,939,168,768 bytes free

94.848
 
With Ctrl-C, it works sometimes for me (I pressed Ctrl-C after a few seconds each time):

Code:
0.000timeout 10

Waiting for  9^Ceconds, press a key to continue ...
1.273timeout 10

Waiting for  8 seconds, press a key to continue ...
0.000^C

0.000timeout 10

Waiting for  8^Ceconds, press a key to continue ...
2.364timeout 10

Waiting for  8^Ceconds, press a key to continue ...
2.409timeout 10

Waiting for  8 seconds, press a key to continue ...
0.000^C

0.000timeout 10

Waiting for  7 seconds, press a key to continue ...
0.000^C

0.000timeout 10

Waiting for  7^Ceconds, press a key to continue ...
2.550
 
Back
Top