Coder Social home page Coder Social logo

timers's Introduction

timers

A countdown timer for your command line.

Features

  • Simple notation
  • Countdown display
  • Timer end notification
  • Log usage to output file

Usage

Set countdown for 1 minute

$ timers 1m

Set countdown for 1 second

$ timers 1s

Set countdown for 1 hour

$ timers 1h

Log usage to output file

$ timers -o log.txt 10s

Log format: timer_set,start_date,end_date

start_date and end_date in RFC3339 format.

For more granular control, you can combine units. To set countdown for 10 minutes and 30 seconds,

timers 10m30s

timers's People

Contributors

123vivekr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

timers's Issues

Parse arguments and environment variables

A few random ideas from the top of my head:

  • Would be nice to just run timers and start a stopwatch. (Right now it only functions as a countdown timer)
  • Disable timer end notification (with an argument or an environment variable)

Time drift

The countdown output is in seconds. But perhaps you did experiment with the units, and found out the time drift caused by the linear sequence of operations. This time drift, although minute, will add up to significant amounts when the timer is set to a high value, like 5 minutes or so.

Here is the output for elapsed time (in milli seconds):

1000
2000
3001
4001
5001
6002
7002
8003
9003
10004

Log session into file

I use this to track time but I also want to store the tracking information in a file for later analysis. It would be useful to have timers output to a time log file about the timer sessions. The start time, end time and the date would be useful to have. And this output to file functionality could be toggled on by using some flag --track.

WebUI console

We could have a desktop app + web UI which could

  • control the timer
  • show usage statistics

To explore:

  • Tauri or WRY
  • Web application

Press r to restart

The only way to restart the timer right now is to kill the application and then run it again.
It would be a nice touch to have the timer restart whenever the user presses the 'r' key.

A possible solution involves running a separate thread that waits for user input and restarts the timer whenever an 'r' character is recevied.

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.