Git Product home page Git Product logo

fpclock's Introduction

fpclock

fpclock – a program measuring process execution time

Author: Paul Lipkowski

Installation

  • Required: FreePascal Compiler fpc (version 3.0.4 or newer)
  • So far works on Linux amd64, MacOS AArch64/ARM64, and Windows x64 only.
  • Not designed for 32-bit computers.
  • If using Linux, FreeBSD or MacOS, then just compile by executing compile.sh
    • Then you can install fpclock to $PATH using installBash.sh (for Linux users)
  • If using Windows, then compile by executing compile.bat
    • The default version of FPC is 3.2.2. If you use the another version of it, then edit the compile.bat script and change the setting containing FPC version (variable ver) in order to match your version.

Usage

  • Syntax: fpclock 'process' [flags]
  • Available flags:
    • (no flag) – Show execution time of COMMAND in seconds with precision of 4 digits and feed the line afterwards
    • -c, --cstring – Input command is C-like formatted (e.g. 'echo \"Hello world\"')
    • -e, --env=E – Choose the environment – E is either cmd (default) or powershell (Windows only)
    • -h, --help – Print help
    • -n, --no-feed-line – Do not feed the line after having shown output
    • -p N, --prec=N – Set precision to N digits (default N=4)
    • -P, --prompt – Prompt for a command from standard input
    • -u U, --units=U – Set measurement unit to U' (see more Us below)
    • -v, --version – Show program version
    • -V, --version-full – Show full program information (version + target)
    • -w , --wait – Pause after measuring time (Windows only)
    • -w N, --wait=N – Wait N milliseconds after measuring time (Windows only, default N=0)
  • Available units with their flag values (U):
    • weeks - w or weeks
    • days – d or days
    • hours - h, hr, hrs or hours
    • minutes – m, min, mins or minutes
    • seconds – s, sec, secs or seconds
    • milliseconds – ms, milli or milliseconds
    • microseconds – u, us, μs, mus, micro or microseconds
    • ticks – t, ticks
    • nanoseconds – n, ns, nano or nanoseconds (The stopwatch is accurate to 1 tick = 100 ns though - or 1 μs = 1000 ns, if you use MacOS/FreeBSD)
    • clock – c, clock (output like 00:00:00.0000, amount of decimal numbers depends on prec flag).
  • Examples:
    • fpclock 'ls -l'
    • fpclock 'cp ./foo/ ./bar -r' -n
    • fpclock 'cp ./foo/ ./bar -r' -n -p 6 -u ms
    • fpclock 'cp ./foo/ ./bar -r' -n --prec=6 --units=milliseconds

fpclock's People

Contributors

mrkaszeba19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.