Questions tagged [delayed-execution]

Delaying the execution of a program or a procedure by a given amount of time, or until the results are explicitly requested.

Delaying the execution of a program or a procedure by a given amount of time, or until the results are explicitly requested.

279 questions
0
votes
1 answer

Can sleep() in c++ in unix environment be used as the same as delay() in Turbo C++ for windows?

In Turbo C++: while(i<10) {delay(100); cout<<"*"; i++;} will print "*" after a regular intervals of 100 milliseconds. If I try to do the same in C++ in UNIX like: while(i<10) { sleep(1); cout<<"*"; i++;} it prints "*" 10 times after a single…
Saurav
  • 15
  • 6
0
votes
2 answers

Continue script execution without waiting for return in php

I have an app where I create/generate PDF on data retrieved from client side. When PDF is generated, I send those PDFs to desired emails and create download button, so customer can download that file too. The problem is that sending mails take some…
user4729289
0
votes
1 answer

Do while loop not looping when condition is true

What is wrong with my do while loop logic? I want to prevent users from proceeding further into the application unless they provide the correct input. Currently, it will only accept one wrong input before it crashes and produces this…
iNeedHelp
  • 225
  • 1
  • 2
  • 10
0
votes
1 answer

In Java, how do I execute lines of code in a certain order with a delay in between them?

In this code snippet, I want the user to experience the following in the respective order: 1. See the letter he/she entered. 2. Hear the 'wrongAns' sound. 3. After the sound has finished, replace his text by the default "0". Here is what I tried: …
Keegs
  • 95
  • 3
  • 11
0
votes
2 answers

Nonblocking DelayQueue, Java

I'm using Java's DelayQueue to dispatch events after a second delay. But the problem is that, under heavy load, my consumers on DelayQueue block until considerable bulk of offer() operations from another threads are gone. Does anyone know…
Anton K.
  • 933
  • 3
  • 9
  • 22
0
votes
2 answers

How to schedule a timed event which is unaffected by computer suspend

I want to schedule an event to happen at a particular time, regardless of whether the computer suspends in the meanwhile. If computer is suspended when the event should have occurred, I want it to be scheduled immediately on resume. I tried two…
ceperman
  • 405
  • 2
  • 8
0
votes
1 answer

in Rails is there an easy way to create a once per record event to take place in the future

Without using the the resque_scheduler gem, is there a way to set up a task to run 6 hours from right now. I figured that a chron job would do me, but the whenever gem doesn't seem able to run whenever.. it seems set up to run often, but not at…
baash05
  • 4,394
  • 11
  • 59
  • 97
0
votes
1 answer

Server to handle time delayed events

I'm searching materials/ideas/designs to solve architecture problem: I'll have several agents which handle some processing, as a result they can generate state for clients which will expire after some time. Let's say client sent presence state which…
The Tosters
  • 417
  • 3
  • 15
0
votes
1 answer

Sleeping in Lua Without Prohibiting Previous Command

In Lua there is no simple way to sleep for a desired amount of time. To fix this I created a function that does this for me: local clock = os.clock function sleep(n) -- seconds local t0 = clock() while clock() - t0 <= n do end end I then…
user3474775
  • 199
  • 1
  • 2
  • 12
0
votes
1 answer

Phonegap plugins delayed initialization

I am using Phonegap/Cordova 3.4.0 for an iPhone/iPad app. I use the Media and the Dialogs plugins. They work just fine on the iPad, but on the iPhone the sound doesn't play and the notifications don't appear when I press the respective buttons.…
Costin_T
  • 786
  • 1
  • 8
  • 27
0
votes
1 answer

how to make rails 3 do something in some time

I am using the gem: scottmotte / digitalocean which seams to be the best. Please inform me on this. I can create a server using Digitalocean::Droplet.create({:name => droplet_name, :size_id => size_id, :image_id => image_id, :region_id =>…
PyWebDesign
  • 187
  • 1
  • 11
0
votes
0 answers

Delay setText in Game

I tried looking at the other solutions on StackOverFlow, but none seemed to fix my implementation of a game I'm making. I need it to delay each iteration of playGame method(which sets the TextView among other things) for 3 or so seconds without…
CPride
  • 95
  • 3
  • 11
0
votes
0 answers

Managing delivery of form data

I'm currently building a website with a form integrated to a specific page where people can leave their contact information. The website is constructed in PHP. After submitting the form, the data is send to a database & I receive an e-mail that a…
0
votes
2 answers

How do i set delay after function java

I'm developing an memory card game in java. I need a delay after SelectedTile.hideFace(); Control.java package control; public class Control extends JFrame { private static final long serialVersionUID = 1L; public static Control…
Rene
  • 13,299
  • 5
  • 19
  • 28
0
votes
1 answer

Wait to report generation to update records

I have this problem. I have to generate a report using Jasper reports, then I have to update some records according to a some conditions. Here some code: def crearReporte = { //FIRST: generate the report …
Manuel Calles
  • 185
  • 1
  • 1
  • 19