Execution Time

What#

Displays the execution time of the previously executed command.

To use this, use the PowerShell module, or confirm that you are passing an execution-time argument containing the elapsed milliseconds to the oh-my-posh executable. The installation guide shows how to include this argument for PowerShell and Zsh.

Sample Configuration#

{
"type": "executiontime",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#8800dd",
"properties": {
"threshold": 500,
"style": "austin",
"prefix": " <#fefefe>\ufbab</> "
}
}

Properties#

  • always_enabled: boolean - always show the duration - defaults to false
  • threshold: number - minimum duration (milliseconds) required to enable this segment - defaults to 500
  • style: enum - one of the available format options - defaults to austin

Style#

Style specifies the format in which the time will be displayed. The table below shows some example times in each option.

format0.001s2.1s3m2.1s4h3m2.1s
austin1ms2.1s3m 2.1s4h 3m 2.1s
roundrock1ms2s 100ms3m 2s 100ms4h 3m 2s 100ms
dallas0.0012.13:2.14:3:2.1
galveston00:00:0000:00:0200:03:0204:03:02
houston00:00:00.00100:00:02.100:03:02.104:03:02.1
amarillo0.001s2.1s182.1s14,582.1s