Skip to main content
Filter by
Sorted by
Tagged with
2 votes
3 answers
172 views

This is my main script: #!/bin/bash read -p "Name: " NAME read -p "Age: " AGE read -p "Country: " COUNTRY echo "Your name is $NAME. You are $AGE years old. You ...
Benedix's user avatar
  • 31
0 votes
1 answer
238 views

I'm working on my first personal project - making a simple game of blackjack with Java and Java Swing (just what my class is going over) and I want to make it so that when a card is drawn in ...
Andy Zheng's user avatar
7 votes
1 answer
87 views

I want to wake up the ESP when it receives a message on the UART2 port. However, with the following code it never wakes up, even if a message is received. I am using the Lolin 32 Lite Devboard. #...
Tillmann's user avatar
  • 133
2 votes
1 answer
115 views

I am attempting to send out a grid, or lattice, or "matrix" of API requests using asyncio: For a "category 1," I may wish to request the datasets 1a, 1b, 1c. For category 2, I ...
SapereAude's user avatar
0 votes
0 answers
23 views

I want to develop a UMD (user mode driver) on windows, when UMD will notify apps when windows exited from modern standby. So, I want to know how a UMD know when windows exit modern standby? I find ...
user28917373's user avatar
1 vote
0 answers
53 views

So, in my program I am trying to achieve microsecond precision, not only for counting purposes but also delays and sleep functions. I have tried all the functions like time.time or time....
Juu  's user avatar
  • 11
3 votes
1 answer
176 views

I was having strange performance issues in a single-threaded real-time program which I eventually narrowed down to this minimal example. It takes an array of 1 million floats as inputs, does some ...
greenlagoon's user avatar
0 votes
1 answer
83 views

As explained here, the Windows API GetMessage() blocks until a message is available. I would like to automatically wake after n seconds. Alternatively, I'd like to have the system post a WM after n ...
SRobertJames's user avatar
  • 9,367
-3 votes
1 answer
147 views

How can I ensure that a Message Loop in Win API doesn't use the CPU when no messages are available? In other words, I effectively want a Message Loop which says "Sleep until I have a new message&...
SRobertJames's user avatar
  • 9,367
2 votes
0 answers
58 views

I am working on an embedded Linux system (kernel-5.10.24), and I am testing libfaketime in the system. I got the master of libfaketime, after built it, I ran my test in shell as follows. with sleep 4 ...
wangt13's user avatar
  • 1,307
0 votes
0 answers
87 views

From the docs: setswitchinterval Set the interpreter’s thread switch interval (in seconds). This floating-point value determines the ideal duration of the “timeslices” allocated to concurrently ...
mike rodent's user avatar
  • 16.1k
2 votes
1 answer
220 views

The following code fails to wait for picoseconds_longlong(1'000'000'000'000). Why? #include <chrono> #include <iostream> #include <thread> using namespace std; using ...
bers's user avatar
  • 6,309
1 vote
0 answers
62 views

I've been working on a project with PIC18F25K80 MCU for a while. My main purpose is to collect some sensor data based on user-defined intervals(like 1min) and since this is a battery-powered ...
ceryankolik's user avatar
0 votes
1 answer
281 views

I'm finding it difficult to find much reliable information on how to implement deep sleep in combination with wake on external IO with ESP32C6 (ESP32-C6-DevKitC-1, rev. 1.12). After days of false ...
DaveL17's user avatar
  • 2,061
0 votes
0 answers
60 views

Technical info: JSF application (2.0) that is deployed as an EAR on a WL 12.2 machine. Problem: The users of our web application regularly upload DOCX files. But this file type is not allowed for ...
Korean Vaporeon's user avatar
1 vote
2 answers
251 views

A vendor application we're using utilizes multiple processes (not threads) spread across multiple computers, one for each processing core available. When asked for a batch of calculations, the ...
Mikhail T.'s user avatar
  • 4,266
0 votes
0 answers
55 views

I have an Android Service for reading messages which is always enabled in my App. Sometimes connection to the Messages Broker is gettings lost and it call special event for recconecting. Log.d(TAG, &...
I am Bodya's user avatar
2 votes
2 answers
95 views

I'm having trouble with a program I am trying to write for my PCjr, where I need to pause the program for an amount of time before running the next instruction. Here it is: 10 CLS 20 PRINT "|&...
Mrredstone333's user avatar
1 vote
1 answer
85 views

I want to have a delay in my code, but I dont want to delay all of my code, just this part. Is it possible to do that? Modules like time or os etc. only have option to delay all the code after using ...
user avatar
2 votes
2 answers
2k views

I was looking into a cancellable async delay in Swift which is backwards compatible to iOS 15: Task { let before = Date.timeIntervalSinceReferenceDate let seconds: TimeInterval = 100 ...
neatchuck's user avatar
  • 833
0 votes
1 answer
192 views

I am wanting a check to be done every 5 mins. For this to happen there obviously needs to be a timer of some description running in the background. I have a timer func which calls a working func where ...
PW1990's user avatar
  • 489
3 votes
1 answer
80 views

I need to make a call to an API separately for each row of my tibble. How can I introduce a small lag between each call? I need to do this because the API I am using limits the allowable number of ...
bill999's user avatar
  • 2,580
0 votes
0 answers
53 views

On one of my project, the CI is super-slow, even so slow that we can't run some specs on all machines or it takes hours. Yes, hours. It shouldn't take that long, that's for sure, because those specs ...
Kevin Vinhas's user avatar
4 votes
1 answer
80 views

Help, I'm trying to setup my environment to do a Hello World. 1 #!/usr/bin/env mujs 2 ...
Vorac's user avatar
  • 9,256
0 votes
0 answers
44 views

chapter- 6, desin of unix operating system book (question-16). Suppose a process attempts to go to sleep on event A but has not yet executed the code in the sleep algorithm to block interrupts; ...
Hariharan R's user avatar
0 votes
1 answer
321 views

I am taking the os course for mit6.s081, but I seem to misunderstand some concepts in sleep&wakeup. My problem is that after scheduling occurs in sched() in sleep(), p->chan = 0 does not seem ...
jone show's user avatar
0 votes
0 answers
51 views

I am debugging python in MS Visual Studio Code and stepping through the code with F11. When I get to a timer sleep() method, during the "sleep period" the Call Stack goes blank and I have no ...
FlexMcMurphy's user avatar
0 votes
1 answer
48 views

I have suck script for Twitter login automation. I've set waits on 21 line and I script to wait on 34 line. But driver.sleep on line 34 doesn't work 'use strict'; const {Browser,Builder, By, Key} = ...
kaka's user avatar
  • 1
0 votes
2 answers
102 views

So, I'm on Arch Linux, running i3 I have a slideshow script that changes the background every 5 seconds. And I have a bunch of signals, such as toggle, next, previous, faster, slower. I have all of ...
Self learning student's user avatar
1 vote
0 answers
47 views

This is my first time working with threads so I apologize if the answer to this is simple. I have a GUI and when the user clicks a button, I want it to update the text to display the fact that a task ...
Blake's user avatar
  • 19
-1 votes
1 answer
166 views

I'm trying to run multiple commands in Windows cmd. And need to sleep for ~4 seconds between the commands. I copy my commands block to the cmd and then want them to run one after the other with breaks ...
STF's user avatar
  • 1,511
0 votes
1 answer
177 views

Normally in VCL and FMX, you can use Sleep() to pause execution of code. So something like this as an example: while true do begin // Do some code Sleep(50); end; So after every iteration, it ...
Shaun Roselt's user avatar
  • 4,361
0 votes
1 answer
687 views

I need to suspend a thread (or process) for a specific duration. In other languages, like Python or JavaScript, this can be achieved using time.sleep() or setTimeout(), respectively. What is the ...
Ruslan Ustitc's user avatar
3 votes
1 answer
141 views

I am building a web crawler in V to index some URLs. The problem: I need to limit the amount of requests I send every second, and let’s say I want to send a request every two seconds. I've used many ...
THE CAT BROKEN's user avatar
1 vote
0 answers
57 views

C++ beginner here, so please excuse me if this is caused by something simple I'm overlooking. I was learning how to use the \b and \r commands. In my test program, they seem to run just fine, but when ...
Dushyant Kumar's user avatar
0 votes
0 answers
47 views

from PyQt5.QtWidgets import * from PyQt5 import QtCore from PyQt5 import QtGui import sys import time class Window(QMainWindow): def __init__(self): super(Window, self).__init__() ...
Tara's user avatar
  • 1
0 votes
0 answers
1k views

I am using react-oidc-context with oidc-client-ts for keycloak authentication. Oidc-client-ts provides automaticSilentRenew setting, and it's working fine when the tab is inactive or active. I always ...
Vaishali Mangukiya's user avatar
-1 votes
1 answer
53 views

I added a loop which tries to read data from a database and if not yet available, sleeps for 250ms and try again. It works, as in, it will eventually retrieve the data, but the time it takes to do so ...
Alexis Wilke's user avatar
  • 21.2k
-3 votes
3 answers
233 views

I need a sleep function for my Js code. I can use a promise based function but that needs await keyword to work. But the problem is I need to use the sleep function at the top level. function sleep(...
Castler Steve's user avatar
1 vote
1 answer
121 views

The behavior of async functions is different even though they are almost the same code, but I don't understand why. My code is: import asyncio async def func1(): await asyncio.sleep(1) print(&...
Kumar Ayaman's user avatar
0 votes
0 answers
496 views

i need some help figuring out my mistake. I have a custom Esp32 C3 Board which is powered by a 18650 Battery and has a charging and battery protection circuit. The esp is supposed to go to deep sleep ...
Niklas Jakob's user avatar
1 vote
1 answer
97 views

"I want to write a program that consumes 5 seconds of CPU time, where the time spent off the CPU due to IO, context switches, etc., is not counted towards this 5-second time quota. Currently, I'...
Frontier_Setter's user avatar
1 vote
1 answer
17 views

Guys everytime I use time.sleep() my program misbehaves and I needed to delay my program for a few seconds before proceeding what can I do I imported time and my program started to hang I cant even ...
clyder sparks's user avatar
0 votes
1 answer
50 views

I have this function I wrote to do a simple type of half-way search for an integer, as a practice problem. When I run it, I would expect these print statements to be firing after each while loop, ...
Otis's user avatar
  • 1
1 vote
0 answers
420 views

I'm encountering an issue with std::this_thread::sleep_for() in my C++ application. I'm using it to pause the main thread for a small duration to adjust my frame_rate, but I've noticed that when [...
Mich's user avatar
  • 21
0 votes
1 answer
56 views

**I'm working on a school project involving UDP streaming in Python, where a client (udp_stream.py) sends messages to a server (udp_stream_server.py). The client script is designed to send a specified ...
wulds's user avatar
  • 71
-1 votes
2 answers
203 views

here's the error i got #ifdef _WIN32 #include <windows.h> #endif #include <iostream> #include <cstdlib> using namespace std; int main() { srand((unsigned)time(NULL)); int ...
amohama's user avatar
-2 votes
2 answers
126 views

So my object is simple and need to know if I can either make my code better all the way around or remove sleep from my code and somehow wait for the async task to finish with getting data from a ...
Shawn Mulligan's user avatar
1 vote
0 answers
645 views

I writing some scripts in Google Colab. I am not using Google Colab pro - just the basic version. Part of the flow requires me to execute a binary command (i.e. bash command) - to set something ...
dtb's user avatar
  • 21
0 votes
1 answer
84 views

If I made a function as a dramatiq actor and put it to sleep for 10 minutes before performing certain tasks,does it wait for the sleep to be completed before performing those tasks or does it ...
kiran's user avatar
  • 1

1
2 3 4 5
65