19,674 questions
0
votes
1
answer
124
views
Get System.Timers.Timer to fire on a WPF Window's thread using the Timer's SynchronizingObject
I tried setting the SynchronizingObject like this:
timer.SynchronizingObject = this;//The Window
but VS told me I need an explicit cast. So I did that and the error went away.
timer....
4
votes
2
answers
158
views
How to call a composable function after a certain time in Jetpack Compose?
When my application starts, I launch an animation. Now I would like to switch to another component (navbar) after 30 seconds. In my research, I saw that the delay function from the Kotlin Coroutines ...
4
votes
1
answer
130
views
Boost Asio Timer interruption after signal is handled
I have the following program that just runs a timer for 5 seconds and has a signal handler.
#include <boost/asio.hpp>
#include <chrono>
#include <iostream>
#include <signal.h>
...
4
votes
4
answers
357
views
Task.Delay versus custom DispatcherTimer-based delay in WPF
I have a WPF project, and in some of the async event handlers in the WMain.xaml.cs I am using the Task.Delay method to suspend the execution of the handler. Example:
private async void Window_KeyDown(...
0
votes
0
answers
26
views
NRF52832 bluetooth mesh lightness setup server set cb triggered by timer
I have an issue with the Lightness setup server set cb being triggered without a connected device and is not internally called in my code. Yet for some reason the set cb is triggered every time my ...
2
votes
1
answer
112
views
Timer 0 macro constants for Microchip PIC18F8722
I am using MPLAB X IDE version 5.43 to develop an embedded project for a PIC18F8722 microcontroller.
It has a timer TMR0 which can be configured to be 32 bits.
I had lots of statements:
TMR0L = 0;
...
0
votes
1
answer
103
views
Custom timer implemented as foreground service experiments delay after background
I want to implement just a simple timer which runs in background. For this purpose I have wrote it as a foreground service special use (its use does not fit the existent foreground services).
I ...
0
votes
0
answers
72
views
Is there a way to have the timer override the prompt input?
I'm trying to make a terminal quiz that has a timer running in the background while you answer the question, which, once finished, overrides the input if it hasn't been filled.
I've tried putting the ...
0
votes
1
answer
60
views
Spring Boot Actuator 'http.server.requests' metric MIN time
The actuator endpoint /actuator/metrics/http.server.requests can exhibit this informations:
{
"name": "http.server.requests",
"baseUnit": "seconds",
"...
1
vote
1
answer
88
views
STM32L010C6 TIM2 IRQ priority, over capture vs edge detection, classic timer issue
So I want to use a capture compare to measure an input frequency 0.1 Hz to 100 kHz.
The peripheral clock is set to 32 MHz to cover the full range and maximise the speed of calculations.
At lower ...
1
vote
1
answer
67
views
How to reproduce a list of DateTimeOffset values (using Timer?)
Let's say I have a list of objects that represents readings from a GPS or a temperature sensor or something like that. Each object contains a DateTimeOffset property with the time of the reading (not ...
0
votes
2
answers
86
views
countback from date is negative, how to make numbers positive? [closed]
i am trying to use a countback from a certain date, and want it to read something like (100d, 10hrs, 10sec). the countback does this fine, except it reads as (-100d, -10hrs, -10sec). is there a way to ...
1
vote
1
answer
165
views
STM32 Input Capture callback not triggering
I am using a Nucleo-G070RB with STM32CubeIDE and trying to do some testing for a project with the input capture. The timer callback doesnt get called though. The circuit is simple, I just want to get ...
0
votes
1
answer
125
views
Excel VBA code "Application.OnTime" skips seconds
I have a timer within Excel VBA code which did run smooth untill 6 weeks ago. Please see the code below. I use this timer in a workbook. I use 2 identical copies of this workbook (with different names)...
0
votes
1
answer
81
views
Event load can't be found BC30590
I comeback with an error BC30590 the event Load can't be flound. I want to display date and time on a mMain form This is the code but is not working. Thank you very much.
Public Class MainForm
...
2
votes
1
answer
66
views
stm32f103c8t6 timer 1 pwm outputs not working
I'm working on a project that needs 3 pwm outputs. I'm already tried with timer 2,3,4, and they work fine with my library. But I wanted to port my pwm library to timer 1 and now I see that A8, A9, A10 ...
0
votes
1
answer
65
views
Error of where Type 'Timer' has no member 'scheduledTimer' in my code: [closed]
In the code below, I receive the error - Type 'Timer' has no member 'scheduledTimer' - which I thought was an import issue but seems to be constant despite the results. How can I remove this error ...
1
vote
0
answers
56
views
Very Specific Combination of Servo.write and analogWrite messes up frequencies on esp32 PWM pins
Preface: First time asking a question, please take it easy with the "YOU SHOULD FORMAT YOUR QUESTIONS THIS WAY!"
Question: Why does this happen?
I'm programming an esp32 S3 dev module using ...
1
vote
1
answer
42
views
How would I get a timer to continuously move the car after pressing the start button
How would I make it so that the car repaints continuously after pressing the start button and the start button doesn't have to be clicked multiple times for the car to move.
// Initialize the timer ...
0
votes
0
answers
57
views
Simplest timer in C [duplicate]
I am trying to make the simplest timer program in C. My attempt is as follows:
#include <stdio.h>
#include <time.h>
int main()
{
char c;
time_t start, end;
long int day, ...
1
vote
0
answers
23
views
Persistent Issues with JavaScript Timer Integration for Page Transitions and NameError in Streamlit Cloud App
I'm developing an English language test web application using Streamlit Cloud. I'm trying to integrate a JavaScript timer to handle page transitions after a set time, but I'm encountering persistent ...
1
vote
0
answers
106
views
C++ thread timer function with consistent timing on Windows?
I am trying to build a cross-platform threaded timer function in C++. Here is what I have so far (posted also in Statically linked pthread and terminate called after throwing an instance of 'std::...
1
vote
0
answers
81
views
How to Implement a Cross-Platform Background Timer with Notifications in React Native (Expo)?
I’m building a workout app in React Native with Expo, and I need to implement a rest timer that works even when the app is in the background or the phone is locked. When the timer completes, a ...
1
vote
1
answer
150
views
Need Help Getting a Hardware Timer on an ESP32 to Start and Stop and Then Restart on a Trigger
I am trying to get a hardware timer in an ESP32 to start and stop based on states in a FSM.I have read quite a few ESP32 Timer Howtos, and I am still not getting it to work.
The timer functions ...
1
vote
2
answers
45
views
How do you spawn prefabs so they come 1 by 1 and that I can remove the bandit in the hierarchy?
I want to multiply my prefab (bandit) every few seconds, but if I remove my prefab in the hierarchy it is no longer spawned. I put this in my project view as prefab but this doesn't seem to work. The ...
-1
votes
1
answer
72
views
I am trying to stop inputtimeout in pycharm but i don't know how
My code is:
import random
from inputimeout import inputimeout, TimeoutOccurred
# todo inputs
b = input("press enter to start")
lowest_numb = input("lowest number")
...
1
vote
1
answer
83
views
How to Change the Color of an Element After Some Time in Vue.js [closed]
I’m working with Vue.js right now, and I’m trying to figure out how to change the color of an element after a few seconds. I’ve looked online and tried asking AI for help, but nothing really works, ...
1
vote
0
answers
56
views
TTimer inside TTask does not run in Delphi
I have a Delphi 12 app that launches several threads that execute a task, that is, the same task repeated in N threads, there are no critical sections, no blocking or any other complications. Inside ...
0
votes
1
answer
138
views
Is there a way to create a very fast auto Timer system without it being inconsistent in Godot?
I'm a Godot newbie. I'm making a top down zombie shooter game just to explore the world of game dev. While trying to make automatic rifle, I found that it shot very inconsistently. How I did it was I ...
2
votes
2
answers
418
views
STM32G4 TIM1 center aligned PWM update event problem
I'm facing an issue with the update event triggering in STM32G4 TIM1. I've configured TIM1 to generate PWM signals and set the update event to Center-Aligned Mode 1. However, I've noticed that the ...
0
votes
0
answers
160
views
Playing Specific Segments of a Replay Block in CANoe using CAPL
I have a replay block (in simulation setup) in CANoe that contains a 2-hour measurement. However, I only need two certain parts of this measurement and I don't want to play the entire 2-hour recording ...
0
votes
1
answer
165
views
Timer is not ticking when message box is open
I have an inactivity timer that keeps checking for inactivity throughout the app. The problem is, when message box is open, the timer is not ticking and checking for inactivity as long as the ...
0
votes
0
answers
27
views
Need a reliable alarm for the timer, even when the device is idle
Problem Statement:
In my Flutter-based Android app, I’m implementing a timer feature, but alarms are unreliable when the device is locked for a long time. Sometimes they ring late, and sometimes they ...
1
vote
0
answers
89
views
Thread crash during boost::yield inside catch block
I'm currently investigating a crash scenario that is caused by performing a Boost yield inside a C++ catch block. Here's a minimal reproducible example that leads to a crash.
Notice the following ...
1
vote
1
answer
62
views
Android Kotlin how kill a timer or countdowntimer fast?
The problem: if I smash the button, I ended up with multiple timers.
lateinit var timer1: CountDownTimer
...
Button(onClick = {
timer1 = object: CountDownTimer(20000000, 1000) {
...
0
votes
0
answers
30
views
Flutter: Multiple timers losing precision after screen lock/unlock
Problem
I'm developing a Flutter application with multiple simultaneous timers. These timers need to keep running correctly even when the user:
Navigates away from and back to the page
Closes and ...
0
votes
1
answer
376
views
python systemd timer every 2.5 hrs past the hour, but it runs every 2 hrs
I am forced/bound to use python 2.7. I have created a systemd timer (and system.service of course) where the timer should run (24/7) every 2.5 hours past the hour. So starting at 00.00, 02:30, 05:00, ...
1
vote
1
answer
64
views
STM8 Timer1 glitch or stalling issue
Timer error 1 in STM8S003F3P
I am writing code to create overflow 1s = Timer 1 to reduce the remaining_sec variable from 60 to 1. But the Timer often hangs for a while at random times.
For example, ...
0
votes
0
answers
41
views
Why does`LAPIC_SVR`, `LAPIC_TDCR`, `LAPIC_TICR`, `LAPIC_TCCR`, address value is zero even after write?
I am trying to enable periodic APIC Timer in x86 architecture based 64 bit OS.
void apic_timer_init(uint32_t frequency) {
disable_interrupts();
// Ensure APIC is enabled (set Spurious ...
0
votes
1
answer
64
views
How to create a 24 hour timer?
I want to create a 24 hour sale timer and display it inside button. I am using this code but don't know how to stop this timer.
This is my code. In this example I use 35 second to test this faster:
...
1
vote
1
answer
438
views
Timers vs Threads (Zephyr RTOS) - which is more appropriate where?
Hi I have been working with RTOS environments for some time now (FreeRTOS and Zephyr) and I was wondering if, generally speaking, RTOS timers are considered more lightweight than threads. I am ...
1
vote
2
answers
100
views
STM32F427 controlling TIM4 channels (PWM) with signle DMA stream
I am trying to control all 4 TIM4 pins for PWM signal using DMA. Can I send data to each pin with single DMA stream ?
When I setup the pins and DMA in STM32 IDE it links the TIM4 Channel 1 pin to DMA1 ...
1
vote
1
answer
66
views
Using love2d timer, bug reporting 'Error hump/timer.lua:78: attempt to index local 'self' (a number value) '
below is where the error may occur
Here is my main.lua and I note the place where I think the error is. What I can't figure out is why this sentence will return a number value?
I'm learning Downwell's ...
0
votes
0
answers
80
views
Why is my Timer class not executing when started consecutively with no delay?
I have a custom Timer class in C++ that uses std::async to run a timer in a separate thread. The problem I'm facing is that when I call start() on the same Timer object consecutively with no delay, ...
0
votes
0
answers
19
views
A timer not starting automatically in python [duplicate]
I'm making an app for guitar fretboard practice/memory using PySide6. The app has an "Auto Mode" feature (A checkbox) that uses a QTimer to display new "questions" at regular ...
1
vote
2
answers
119
views
Why is increasing the "resolution" of a timer actually decreasing accuracy?
The central part of my App is a timer. Thus far this was the Code (taken out of the main Codebase to be minimum reproducible):
import SwiftUI
struct TestView: View {
@State var countdownTimer = ...
2
votes
5
answers
530
views
High frequency polling loop in C#?
I'm trying to create a high-frequency polling loop in C#, but I've issues with accuracy and CPU usage.
Example 1: The loop sleeps for ~15.6ms, instead of the specified 1ms per iteration. I discovered ...
0
votes
0
answers
57
views
watchOS timer app freezes UI in dimmed state while haptics continue working
I'm working on a watchOS timer app that needs to run for 3 1/2 minutes while showing countdown numbers. I think that I've discovered that there's nothing to do with the watch dimming- that's a system ...
1
vote
1
answer
79
views
The Concurrency Issues of mod_timer and refcount_inc in the linux kernel
I have found several pieces of code where refcount_inc is called after the mod_timer. E.g. this one:
static int ip_frag_reinit(struct ipq *qp)
{
unsigned int sum_truesize = 0;
if (!mod_timer(&...
1
vote
1
answer
155
views
Rust timer not triggering after the specified timeout
I am having some problems with timers: I cannot identify the reason why this is not working properly:
use std::sync::{Arc, Mutex};
use timer::Timer;
struct Counter {
value: i32,
}
impl Counter {...