Questions tagged [timing]

timing is a numerical measurement of the how long it takes to execute an instruction or series of instructions

Timing is a numerical measurement of the how long it takes to execute an instruction or series of instructions. See also .

To get a better understanding of performance of a given code, it should be measured at several problem sizes and empirical orders of growth calculated.

1396 questions
-1
votes
1 answer

Javascript setTimeout sequence

Say I have this line of javascript- setTimeout(function() { console.log("okay"); }, 5000); /* Blah blah- more code */ Is that going to wait 5 seconds, run the console.log(), then continue on the the rest of the script? OR Is it going to set the…
Alex
  • 1,035
  • 3
  • 16
  • 31
-1
votes
1 answer

Understanding the timing of storing and retrieving an ArrayList of Strings

I'm having a tough time understanding the timing of storing and retrieving private members in a Class. I'm simply trying to gather RSS titles from the XML file and display them in a TextView. I Log'd the flow and it confuses me why the…
fergatron
  • 13
  • 6
-1
votes
2 answers

how to convert a certain number to hours/minutes?

Hello everyone well i have a certain long number and i wish to divide it and show how many minutes and hours remaining : timeToReceive = Utils.currentTimeMillis() + (60 * 1000 * 60 * 8); // 8 hours here is my timeToReceive long. I want to show how…
user3569895
  • 13
  • 1
  • 5
-1
votes
3 answers

Time Generation in Java

Yesterday I was screwing around with Java, and I wrote this application. public class MaxInt { public static void main(String[] args){ long startTime = System.currentTimeMillis(); long endTime; for(int i = 0; i <…
Willchill
  • 13
  • 2
-1
votes
1 answer

Using setTimeout in javascript to simulate php's sleep

I have an AJAX function which takes some time to complete. When it's done I want to open a new tab with the result. To do so I've came up with three options: Use window.open() from the AJAX-call Use window.open() in the javascript function/event…
Ben Fransen
  • 10,884
  • 18
  • 76
  • 129
-1
votes
1 answer

Estimate SQL query time

If SELECT attr FROM t WHERE attr2>=0 LIMIT 10000; took about 0.26 sec. How much time (very roughly) would SELECT attr FROM t WHERE attr2>700; take to run? mysql> EXPLAIN SELECT attr FROM t WHERE…
qazwsx
  • 25,536
  • 30
  • 72
  • 106
-1
votes
1 answer

Process Timing when Scraping

I have a site that that scrapes off of it's sister sites but for reporting reason I'd like to be able to work out how long the task took to run. How would I approach with this with PHP, Is it even possible? In an ideal world if the task couldn't…
David
  • 10,435
  • 3
  • 17
  • 11
-2
votes
2 answers

Button click timing a php game

I would like to put the 1/1000 second when a button is clicked into a session variable - $_SESSION['Click'] or $_COOKIE['Click'] echo ''; The site…
Elvenlord
  • 1
  • 3
-2
votes
1 answer

Why do two tasks take much longer if running in multithreading than in mono threading?

I wrote this Java method which takes about one second to run (on my computer): /** * This method takes about one second to run. */ private long eseguiUnitàDiLavoro() { double x, y = 1000; final long start_time,…
geko
  • 11
  • 4
-2
votes
1 answer

Giving a user 10 minutes to complete a task

The user has 10 minutes to complete this quiz and it should terminate when 10 minutes(600 seconds) are over. Currently the code to my knowledge starts a timer, prints a question, receives an answer and checks if the answer is correct, and after…
-2
votes
1 answer

SystemVerilog a series of delayed assignment

I'm new for Verilog syntax. Is there any way to make this assignment as single line in SystemVerilog? For example, sequential bit assignments is given by out <=1 out <= #1 0; out <= #2 1; …
syk
  • 1
  • 3
-2
votes
1 answer

How do i make a function repeat in javascript with ajustable timings

i want to make this code work: let wait = 1; function speedup(){ wait = 0.5 } // I want it so that if the speed-up button is pressed the code repeats but faster speed up
-2
votes
1 answer

How can I make a part of code wait without halting everything else in JavaScript?

So, I need to make a function wait a time interval before executing, however, I need the rest of the code to execute while this wait is happening. Basically, I want to change variables in function of time passed without having to make all code wait…
tralph3
  • 452
  • 4
  • 13
-2
votes
1 answer

cudaEvent and gettimeofday report drastically different time

I'm trying to time a loop by using either gettimeofday or cudaEventRecord. However, they report very different results. Here's the pseudo code: // get time here (start) while (..) { . .. } // get time here (stop) // calculate…
user3813674
  • 2,553
  • 2
  • 15
  • 26
-2
votes
1 answer

Is there a way to find out which method takes most time ? Eclipse Java

I'm programming a little Javagame for Android and would like to know if there is a possibility in Eclipse to find out which method takes the most time to execute.
user0815
  • 213
  • 2
  • 11
1 2 3
92
93