Git Product home page Git Product logo

timer-app's Introduction

Timer application on the console.

Discription

This is timer application runnning on command line.
The development language for this application is Rust.Due to this, you can run the application without the need to install a compiler or interpreter.

Run

cd timer-app root directory.

cd timer-app

Then, please execute the following command.

 ./target/debug/timer-app 

Alternatively, if rustc and cargo are available on your computer,please execute the following command.

cargo run

Project Dependcies

I used this crate.

timer-app's People

Contributors

nakaryo716 avatar

Watchers

 avatar

timer-app's Issues

Introduction of asynchronous runtime.

The benefits

Efficient resource utilization

Using asynchronous processing allows you to progress with other tasks during idle times. For example, instead of using sleep to wait within the timer function, you can perform other asynchronous operations during that time. This enables efficient resource utilization.

Scalability of concurrently executable processes

With asynchronous processing, you can extend the number of concurrently executable asynchronous tasks. For instance, launching multiple asynchronous timers simultaneously, allowing them to operate independently, is achievable.

Handling asynchronous events:

Using asynchronous processing simplifies waiting for and handling asynchronous events such as keyboard inputs or signals. This enables the program to react responsively to external events."

"The disadvantages

Complexity in code structure:

Asynchronous programming often introduces complexity in code structure, making it harder to read and maintain.

###Potential for callback hell
There is a risk of encountering 'callback hell' or deeply nested callbacks, making the code difficult to understand.

Debugging challenges

Debugging asynchronous code can be more challenging due to the non-linear flow of execution and timing issues.

Learning curve

Asynchronous programming may have a steep learning curve for developers unfamiliar with the concept, requiring additional skills.

Potential for race conditions

Concurrency in asynchronous programming can lead to race conditions, requiring careful synchronization mechanisms.

Increased resource usage:

While asynchronous programming can optimize resource utilization, it may also introduce overhead in managing asynchronous tasks and callbacks.

Timer Stop or Reset

The current state does not allow resetting the timer without terminating the process, and it is also unable to be stopped.
I attempted an implementation using mpsc::channel(), but it didn't work well. It might be resolved by using an asynchronous runtime or utilizing channel() effectively.  

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.