Giter Club home page Giter Club logo

go-sleep's Introduction

Go Sleep

gosleep is a go replacement for the sleep command that allows you to put time-durations into your sleep commands.

The main goal is to be able to use this as a somewhat backwards-compatible drop-in for sleep, via alias sleep=gosleep, while adding some usability features. The main system sleep would still be able to be used with \sleep if aliased.

Examples

  • gosleep 1 - sleeps for 1 second
  • gosleep 1m - sleeps for 1 minute
  • gosleep 1h30m - sleeps for 1 hour and 30 minutes

Benchmarks

Benchmark data is from my M1 Macbook Pro.

> time sleep 10
sleep 10  0.00s user 0.00s system 0% cpu 10.014 total

> time bin/gosleep 10
bin/gosleep 10  0.00s user 0.00s system 0% cpu 10.008 total
> time sleep $((2 * 60))
sleep $((2 * 60))  0.00s user 0.00s system 0% cpu 2:00.01 total

> time bin/gosleep 2m
bin/gosleep 2m  0.00s user 0.00s system 0% cpu 2:00.01 total

Roadmap

  • add a spinner or some type of progress notification

go-sleep's People

Contributors

iamkirkbater 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.