top of page

Hours Calculator

icone_calc_horas.png
Introduction:

Hours Calculator was created to help me with time calculations, as I was having some difficulty in a particular project. I needed something practical that wouldn’t require me to make conversions all the time.

​

With that in mind, I developed this tool to make everything faster, similar to what we do with a conventional calculator — the difference is that in this case, we’re working with units of time. 😊

Important Requeriments!

â–º When running the program, Windows Defender may flag it as a "virus" or "Trojan" because it's an independent application. However, the program is harmless and will do nothing beyond the function it was designed for. You can check the source code in my GitHub repository.

​

GitHub: https://github.com/cleitinhodev/calculadora_de_horas

​

â–º Warning!!! Avoid downloading from untrusted sources. The user is fully responsible for any misuse of the tool.

Getting to Know the Tool

As we can see, the Hours Calculator is quite simple — the units are separated into Hours, Minutes, Seconds, and Hundredths. I chose to use hundredths instead of thousandths because they are more commonly used in clocks and stopwatches, making the concept easier to understand. Still, the conversion remains the same:


100 hundredths = 1 second
60 seconds = 1 minute
60 minutes = 1 hour

The user can switch between two operations: Addition and Subtraction. In the case of addition, the calculator respects each unit, carrying over values to the next when necessary. For example, 99 + 2 hundredths equals 101 — it converts 100 to seconds and adds them together: 12 + 57 + 1 = 70 seconds, which means 1 minute and 10 seconds. That extra minute is carried over to the next calculation: 35 + 14 + 1 = 50 minutes. Since there was no overflow in this case, we simply add the hours: 11 + 00 = 11. The result is:


11 h : 50 m : 10 s : 10 ms

​

In the case of subtraction, the program identifies which time value is greater, so the subtraction happens without negative numbers. That’s because the goal is to find the difference, not the actual value.

We can also find total values by using logic — for example, determining exactly how long 99999 seconds is. By clicking Calculate, the program processes this as a regular addition, automatically converting the values. However, there is a numerical limit in place to avoid unnecessarily large calculations, since the main goal is simplicity.

Final Considerations
OIG2 (1).jpg

I’m disappointed in you, Senpai!!!

 

You’re using Hours Calculator completely for free, and you haven’t even shared it with your friends??? You didn’t subscribe to Cleitinho’s channel??? You haven’t even checked out his Patreon???

Look at him!!! A poor programmer who’s selling his lunch to buy dinner, and yet he still keeps smiling!!! So, if possible, stop buying Hentai games on Steam and help us with a few cents! That way, Cleitinho can keep developing more tools to make everyone’s life easier and won’t starve to death, okay? Baaaaaaka! :3

​

Repository with the Complete Project: https://github.com/cleitinhodev

​

Patreon to check out upcoming projects: patreon.com/CleitinhoDEV

​

YouTube Channel: https://www.youtube.com/@CleitinhoDEV

​

Thank you all for your support! :)

  • GitHub
  • Youtube
  • Patreon

©2024 por Bugzinho

bottom of page