Questions tagged [clock]

Hardware and system clocks used by drivers, OS and hardware languages.

Clocks are key to controlling synchronous logic and are used by drivers, and OS software. As well, hardware languages, such as and can make extensive use of clocks. CPU or system clocks are familiar to most developers, but a typical computer can contain many different clocks to control different hardware functions such as video, audio, RAM, buses, etc. Familiar current time functions are often derived from a hardware clock which produces interrupts allowing an OS to keep a running time count by recording the interrupt; sometimes called ticks or jiffies.

Related tags

  • - obtaining, formatting times and other uses.
  • - program issues dealing with dates.
  • - measuring execution time with a clock.

See also: PLL, Clock divider

2060 questions
0
votes
2 answers

Make program that plays a different song on loop every hour [Python]

I am trying to make a program that will play a certain song on loop each hour of the day. For example from 12pm-1pm a certain song will continuously play and then once it turns 1pm a different song will continuously play until 2pm. I'm fairly new to…
0
votes
3 answers

Having a hard time trying to calculate the size of the degree of the hour hand in an analogue clock, python

I am having a hard time trying to calculate the size of the degree between the hour hand and midnight in an analogue clock, python. Again, this is part of the Snakify Python problem solving challenges and, I have solved various questions since my…
0
votes
1 answer

Heroku web and clock idle seems idle in the same time

Hi I'd like to know is there any way to prevent the clock idle with the web in the same app Here is my Procfilefile web: gunicorn badmintonApp:app clock: python cron.py and my cron.py is from apscheduler.schedulers.blocking import…
Joseph M Tsai
  • 568
  • 3
  • 12
0
votes
1 answer

where are the numbers ' baseline?

i study the app like this , . /** * draw the hour text (12、3、6、9) * draw the arc */ private void drawTimeText() { //draw the hour text String timeText = "12"; mTextPaint.getTextBounds(timeText, 0,…
0
votes
1 answer

is it possible to hide the hourglass during a $http.get request?

I have an $http.get request that takes a while to be finished. During its execution, the hourglass is shown on the screen, preventing the user to use it. Can I simply hide the hourglass meanwhile the request is being processed? Thanks.
user2568276
  • 89
  • 2
  • 13
0
votes
1 answer

Own digital clock with data und time. efficiently

Yesterday I programmed an own digital clock. I used the google blog: http://android-developers.blogspot.com/2007/11/stitch-in-time.html for help. The following code is the resulat. My question. Is it a efficient way, to update the handle by…
FelixA
  • 127
  • 5
  • 14
0
votes
2 answers

Remove repeated clock hands using set Interval in canvas

Hye, I'm new at canvas. I have issue with my clock. At every call of workinghands() function by setInterval, clock hands ticks forward but the previous hands are not removed. I want to remove the repeated hands on the clock. In the image of clock…
Zeeshan Malik
  • 627
  • 1
  • 14
  • 31
0
votes
1 answer

Python3, Tkinter, and User input request for time

I'm really making some progress on basic concepts and verbiage in Python, but I'm getting a little lost when we start adding Tkinter into the mix. BryanOakley made a great contribution to a question about multiple windows and Tkinter that's…
RL_NooB
  • 5
  • 6
0
votes
2 answers

JavaScript clock that countsdown hours, mins and seconds only.. not days

I am trying to make a JavaScript clock that countdowns from hours and not days. I have used a nice countdown JS script from Stackoverflow and I am trying to adapt the code to my liking. My code: // CLOCK var end = new Date(2017,4,22,23,59); var…
TheBlackBenzKid
  • 26,324
  • 41
  • 139
  • 209
0
votes
0 answers

Calculate MHz from Cycles, Time and Instructions per Second?

I have profiled my program which gives me the following information: Execution time in profiler: 17.39 seconds Instructions: 498.622.849 Average Instructions per Sec: 28.656.485 Cycles: 712.586.889 The code is processing a music file with a…
0
votes
0 answers

Update time display on line by overwriting not adding new lines

I want to create a clock in python. I have this so far from datetime import datetime for i in range (99999999999): now = datetime.now() print (now) This outputs the time great but it keeps generating lines whereas I want it on one line…
0
votes
2 answers

Why doesnt my function count?

I have a function that if you plug a number into it it counts them out. It only does this if you call the function at the begining of the program meaning it has something to do with clock(). I added clock() to the rest of my variables but the…
0
votes
0 answers

Tower coordinates changing in collision method

I have two classes. one class is a monster class, and one class is a tower class. I am trying to detect collision. I store each class in a vector and draw them to the screen. However my collision function which just currently prints out my…
user7161409
0
votes
1 answer

Use desired timezone in javascript 24 hour countdown or offset the countdown so it hits 00:00 at 11:00 local time instead of at 00:00 local time

I have this 24 hour loop countdown and i need it to reset at 11:00 every day instead of at 00:00 like it does now, right now it uses local time zone so either have to change time zone that it uses or time by it by 11 hours. And the next thig i need…
0
votes
1 answer

Pause/Resume javascript Pomodoro clock

I've been working on a Javascript pomodoro clock. I am able to set the session time and break time and it counts down without any trouble. But for some reason I can not get pause and resume to work. When the timer starts I capture the Date.now() and…
Daniel Semel
  • 175
  • 1
  • 1
  • 13