Sublime Forum

How can I change the build time from seconds to milliseconds

#1

I have done quite a bit of searching but nothing has come up how to do this.

I’m referring to the timestamp that appears when you build code with CTRL+B.

This displays in seconds but I was hoping to change this to milliseconds to show a more accurate time scale.

See here as at to what I mean.

enter image description here

The docs for ST for build systems does not show anything of meaning for this setting:
https://www.sublimetext.com/docs/3/build_systems.html

1 Like

#2

The resolution of that number is hard coded in the Default.sublime-package/exec.py. You’d need to create a modified overide of that module to accomplish that.

0 Likes

#3

Thanks, but that file does not exist, I’ve searched my ST folder for the exec.py file but nothing shows up.

I’m not sure where to start by creating this module. Any assistance on this would be appreciated.

0 Likes

#4

The easiest way to create an override is: Command Palette -> View Package File -> Default/exec

You need to save the file to %APPDATA%/Sublime Text 3/Packages/Default/exec.py (assuming you are on Windows), or to ~/.config/sublime-text-3/Packages/Default/exec.py (on Linux).

Note: The exec.py is packed into the Default.sublime-package which is nothing else than a zip file.

1 Like

#5

A side note: You may need to check for changes of the original package after upgrading ST in the future in order to catch up any fixes.

0 Likes

#6

Many thanks for this.

I’ve just changed the two instances in that file to output a less rounded number.

Finished in %.1fs

Was just changed to:

Finished in %f seconds

I might make a suggestion for a setting for this.

Btw, just to make sure, this is the correct format?

0 Likes

#7

Or install OverrideAudit

1 Like

#8

The latest version of OverrideAudit has a Create Override command that makes creating overrides easier as well.

0 Likes