Questions tagged [timer]
Timer is a component that has the functionality to trigger a user defined action at regular intervals as configured by the user.
19,510
questions
0
votes
1
answer
14
views
how to add offline countdown timer capabilities to add things (Lives, Points, etc.)
First time asking a question hopefully I did it right
Self-taught here so lots of questions been looking through other similar questions but haven't been able to find one that answers my question. I'm ...
0
votes
0
answers
14
views
is it possible to get a 24 hour timer interrupt using timer5 in dspic30f4011?
I am trying to trigger an alarm after 24 hours using timer5 of dspic30f4011 using 1:256 as prescale.
using maximum value of timer (0xFFFF) i tried iterating for counter of 125 and 250, for this values ...
-1
votes
0
answers
31
views
Java TimerTask not running
I have a java function like this, which is being run in an AWS Lambda. The first log "A" is being logged in CloudWatch, but "B" is never being logged. I am using JDK11.
public ...
-1
votes
0
answers
25
views
Timer in a CookieClicker game
I suck at programing and i cant seem to even get the basics down in Java. Our teacher introduced us to apache NetBeans almost over a year ago and i still struggle understand the program. I have not ...
0
votes
0
answers
6
views
update all sensors with one code troubles
My problem lies in the code in which i cannot seem to define code or remove atribute errors.
in this code block you will find the which im trying to complete:
class MainFrame(ctk.CTkFrame):
def ...
1
vote
0
answers
27
views
Why does my hardware timer not increment the count using HAL libraries?
I'm writing a program for the SAML21G18B using AtmelStart and ASF4 HAL libraries.
My timer is intended to simply count up until it overflows, at which point a handler increments a count OVF and ...
1
vote
1
answer
23
views
Phaser timer controlled text trouble
I'm trying to have some text that shows one line at a time then change scenes, using events. I'm having trouble though. Here is the code I'm using:
this.query.setText('What was his job?');
var ...
0
votes
0
answers
19
views
Timer in flutter misbehavior (bug?) [duplicate]
I'm new to learning flutter and am learning about timers and progress indicators. I have made an app which has a button which on clicked shows a linear progress bar that goes from 0% to 100% in 10 ...
-3
votes
0
answers
36
views
Why isn't my C program using LEDs, buttons, timers and interrupts running on CCS Cloud IDE with GPIO?
I am supposed to use states to make the LEDs blink in morse using timers and interrupts. I believe I was able to properly do the job, but I do not know why it won't work when I run it in the CCS Cloud ...
0
votes
0
answers
15
views
Increase frequency of input capture of stm32
I'm going to measure the frequency of an input 6MHz signal. I wrote a code that works with the "input capture" ability of STM32 and it works perfectly for signals with frequencies below 770 ...
4
votes
1
answer
50
views
Is there a timer for input() function in MATLAB?
The script below waits until a user press a key ('y', 'n', or any other character) and/or the Enter key:
prompt = 'Do you say yes or no? y/n[n]: ';
txt = input(prompt,'s');
However, I like it to ...
-8
votes
1
answer
59
views
Swift self in a class [closed]
Why can I not use self here? All those are in class MyTimer, So I don't understand why it gives me this error.
I want a timer with scheduldedTimer that belongs to each instance of MyTimer class. And I'...
-1
votes
0
answers
56
views
My void Loop() cannot carry out both while loops in it. Countdown timer unable to switch timers from one session to another in "TickTwo.h" library
I need a little help on my ESP32 countdown timer project particularly on void loop().
As stated in the title, it cant carry out both while loops in void loop().
I have tried to test pomoloop() and ...
0
votes
1
answer
30
views
Phaser timer activated events. How?
I'm trying to make a game where certain things happen based on a timer that keeps going up. For example, certain text, images, or clickable buttons only appear after a certain amount of time has ...
0
votes
0
answers
68
views
(Visual basic) Value 0 is not a valid value for interval
Screenshot of the error
Simple FTP client that automatically synchronizes with servers and retrieves the files.
Application seems to run well on my computer and 3 other computers i have tested it on.
...
0
votes
1
answer
27
views
Flutter web, "wild" timers, any way to stop a timer after F5 is pushed?
I have a Flutter web application where one widget is showing a text (actually a clock).
The timer is a Timer.periodic implementation like this:
class WatchText extends StatefulWidget {
const ...
0
votes
0
answers
8
views
How can I Initialize TIM1 as Capture Interrupt at Channel 4 for CD4060 Pressure Sensor using STM8?
I want to INITIALIZE TIM1 as Capture Interrupt for CD4060 Pressure Sensor.
Can someone help me with this I wanted to know weather my code is correct or if there are some thigs which need to be changed,...
-6
votes
0
answers
44
views
Why does the reset button stop working when the timer is enabled in my game show buzzer program? [closed]
Why is my program not working?
Its a game show buzzer game with a timer but if I make the timer work the reset button stops working. There is a working model above the one with the LCD monitor(the one ...
0
votes
0
answers
43
views
Timer not stopping with other state changes in React Native
I am working on a simple quiz application in react native along with redux. I have a Quiz component (parent) and a Question component (child) in my app. When the user comes to the Quiz component, it ...
0
votes
0
answers
29
views
Redrawing the contents of a AWT JFrame every second
When i use Timer and TimerTask to have it run the code every second it doesn't draw to the JFrame but still runs the code.
public void drawObject(Graphics g, int scale){
g.setColor(colors[rand]...
0
votes
0
answers
68
views
Ways to make callback timer more processing efficient
Here's a simple callback timer that triggers a corresponding callback as soon as its timer is triggered.
Trick though is constantly "polling" for the next interval can be a waste and I see ...
0
votes
1
answer
36
views
How to autoclose a Leaflet popup with timer when mouse move out marker
It's possible to set an autoclose timer for a popup on a marker in leaflet.
var marker1 = L.marker([46.26734, 12.328876], {icon: myIcon4}).on('mouseover', function(e){var popup = L.popup().setLatLng(e....
0
votes
1
answer
89
views
C++ callback timer with start/stop functions
I need to create a class to replicate the functionality of a callback timer from a library I no longer have access to.
Basically, spawn an asynchronous thread that executes some function after a ...
0
votes
0
answers
22
views
Using existing ajax call we have to logout the particular user should be logged out after 15 minutes of inactivity
existing ajax request
This is the ajax request which calls the web browser logout page
function unassignVIP(empid,emplogoff,sr,vendorName)
{
if(emplogoff)
{
$.ajax({
url: &...
0
votes
0
answers
30
views
STM32 cant adjust sample frequency with adc dma
I am using stm32wl55jc1. I want to use accelerometer at 50khz and microphone at 2khz (2048). I am trying to make fft. With pooling adc method, I can do that easily.
for(int i=0;i<128;i++)
{
...
1
vote
0
answers
23
views
How to add delay in JPanel
I'm making a pathfinding visualizer in java and I've got everythings down i just need to add a delay so the maze doesn't get completed instantly once i run the program. I tried adding Thread.sleep but ...
0
votes
1
answer
55
views
Swapping multiple images using timer
I am using JavaScript to change a background-image after a certain amount of time. But I have another 2 images I need to change in exactly the same timeframe. So images A1, B1, C1, then after 4 sec. ...
0
votes
0
answers
61
views
Flutter: update LayerLink of OverlayEntry attached to MouseRegion. Problem with Tooltip's Position
I have a ListView.builder with ListTiles wrapped in MouseRegion. When entering a MouseRegion with the mouse an Overlay attached to this MouseRegion shall be shown in the upper right corner of this ...
0
votes
0
answers
23
views
Timer in Java Netbeans (with GUI builder) not working as it should [duplicate]
I am new to this community and have a question about Java POO. It's about implementing a timer. The question is: why I cannot get a timer with a period of 1 ms. When I chose a period of e.g. 10 ms, ...
0
votes
0
answers
12
views
Timer can not find in scope
Where is it wrong with this code?
@IBAction func startButton(_ sender: UIButton) {
var timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(update), userInfo: nil, ...
1
vote
0
answers
45
views
Why is setInterval/setTimeout so inprecise
I have the following example code:
let last = Date.now()
setInterval(() => {
console.log(Date.now() - last)
last = Date.now();
}, 20);
And it gives me the output
node .\fps_tester....
0
votes
1
answer
25
views
When setting up an interrupt on timer expiry with signal.h and time.h, is it required to put the timer address in sigevent sigev_value.sival_ptr?
I'm currently setting up an interrupt on timer expiry with the Linux system programming libraries time.h and signal.h. In the example provided in this page of the manual, the sigevent field ...
-1
votes
1
answer
11
views
Crontab function scheduler in seconds timer
How to set any postgres function in crontab with frequency of seconds?
Thank you in advance.
Tried searching for seconds timer scheduling. But looks like postgres / crontab doesn't support for seconds ...
-3
votes
2
answers
103
views
1 Week Countdown Timer in Java
EDIT:
I have created a countdown timer, however I cannot figure out how to update without creating a new instance. The code is below:
import java.util.concurrent.*;
import javax.swing.JFrame;
import ...
-4
votes
0
answers
51
views
Why does this code can't use on Teachable?
I'm trying to use the following code on Teachable website, but it doesn't seem to be working. The code works fine on other websites, but not on Teachable..
// Set the date we're counting down ...
-1
votes
1
answer
213
views
How to play "beep" sounds even when the Flutter app is in the background?
Summary
How can I ensure audio plays in my app even when it's minimized or in the background?
Detailed Explanation
I'm working on integrating a timer feature into my app that's designed to emit a ...
0
votes
1
answer
68
views
Delayed Side Effect in Compose
I have a delayed LaunchedEffect that runs every 5 second after the user makes camera to move:
public var isMoving: Boolean by mutableStateOf(false)
LaunchedEffect(isMoving) {
if (!isMoving) {
...
0
votes
0
answers
55
views
RPI_PICO_TimerInterrupt: Any way to set timer to zero to get a known starting time?
I'm using RPI_PICO_TimerInterrupt library for a Raspberry Pi Pico, in the Arduino IDE 2 environment.
The RPI_PICO_TimerInterrupt library by khoih-prog covers what I want to do; one detail is escaping ...
0
votes
3
answers
39
views
Timer count down with React hooks with 2 setTimeInterval approach
I'm trying to implement the countdown timer with React's hooks. I knew, we have couple of solutions out there and thanks for that. My question is NOT How to implement timer with React's hooks BUT What ...
-1
votes
0
answers
34
views
How to fix pygame event timer causing segmentation fault? [duplicate]
I'm making a game and am using two pygame event timers to consistently perform universal actions, however after a while (it changes everytime) it closes and I get an apple popup saying that it crashed....
0
votes
1
answer
37
views
Retrieve the return value of a function used in threading.Timer method
I have a function check_is_window_open which checks if a Windows application is open or not ? If the application is open then it will return 1 else 0
Here is the function :
from pywinauto import ...
1
vote
0
answers
33
views
I cannot reach 1ms accuracy with .net Timers. How can I execute a function periodically with a Multimedia Timer every 30ms? (With 1 ms accuracy)
In my C# project I want to execute a function periodically every 30ms. First I tried the .net Timers, but I have found out that these timer have no more accuracy then 15ms due to Windows OS ...
1
vote
1
answer
136
views
What is the best way to update data on different panels in a form simultaneously? Timer/Threads?
I have an application in Delphi 10.3 which has multiple forms, all holding different data that needs to be periodically updated. I like the idea of having a timer with-in each form that I can control ...
1
vote
2
answers
56
views
React If Timer expired
I'm currently trying to make an API call when my timer hits zero OR is in the past.
This is my Timer componenet
import { useState, useEffect } from "react";
import Box from "@mui/...
0
votes
0
answers
35
views
I have a cyclic executed C# function. Sometimes the exec. time of the function is exceeding the timer period. How can I pause the timer in this case?
In my C# windows service project I am executing a function cyclic with a timer (every 35 ms). The function is reading some values from a remote machine and therefore the executing time is changing ...
0
votes
0
answers
22
views
scheduled timer with CoreMotion
I'm using the CoreMotion framework, and it works, but now I'd like to add a timer that loads a method after 5 seconds.
If 5 seconds have not passed load another method.
the problem is that in the ...
2
votes
1
answer
54
views
Java high resolution sleeping
I want to simulate a clock that ticks on a high frequency in Java. We can think of it as a 1Mhz CPU clock for example. This can be achieved with this code:
// 1000 nanoseconds between ticks.
...
0
votes
0
answers
15
views
How to call CountDown timer from ViewModel class
I am testing how Dispatcher CountDown timer works in my MVVM model project. It works only when I call from constructor method. There is other method that i want to call and start timer based on the ...
0
votes
1
answer
69
views
STM32 Timer registers (PWM Measurement) Not working
I'm trying to measure the pulse width of a signal on the STM32G431RB, and I keep getting random values from the counter registers. I've checked the signal and it's fine (PWM Signal from a receiver).
...
0
votes
1
answer
26
views
why my js timer does not update when the time ended?
my js timer is not being updated after the time ended.
this is my code:
html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<...