timing

Using jQuery Autocomplete with Validator onBlur timing problem

Here's my problem, I have an input element in a form that is implementing jQuery.Autocomplete and jQuery.validate, all working normally except when I click an element in the autocomplete list to select it. What happens is validation occurs before the autocomplete sets its value. Because validation occurs on onBlur, and you just click...

Linux: Timing during recording/playing sound

Hi, I have a more general question, regarding timing in a standard Linux-OS dealing with playing sound and receiving data over a serial port. In the moment, I'm reading a PCM-Signal arriving over a USB-to-Serial Bridge (pl2303) which is recorded, encoded and sent from a FPGA. Now, I need to create "peaks" at a known position in the re...

Delay function from running for n seconds then run it once. (2minute question)

TLDR I have a function that runs on the end of a pan in an openlayers map. Don't want it to fire continously. I have a function that runs on the end of panning a map. I want it so that it will not fire the function until say 3 secconds after the pan has finished. Although I don't want to queue up the function to fire 10 or so times li...

mysql query timer for .net

Is there something i can use to track how long my mysql queries take? perhaps log them if they take > a certain amount of time? or track all queries but only hold the longest query time? using this with C# .NET with ASP.NET. I'd like to use this to occasionally check if my queries are getting slow. ...

dynamic module creation

I'd like to dynamically create a module from a dictionary, and I'm wondering if adding an element to sys.modules is really the best way to do this. EG context = { a: 1, b: 2 } import types test_context_module = types.ModuleType('TestContext', 'Module created to provide a context for tests') test_context_module.__dict__.update(context) ...

Possible iphone animation timing/rendering bug?

Hi all, I have been working on an iphone apps for several weeks. Now I encounter an animation problem that I can't figure out how to resolve. Mayhbe you can help. Here is the details (a little long, bear with me): Basically the effect I want to achieve is, when user click a button, a loading view pops up, hiding the whole screen; and th...

How do you run a long PHP script and keep sending updates to the browser via HTTP?

How do you run a long PHP script and keep sending updates to the browser via HTTP? Something to do with output buffering but I don't know exactly how. ...

ASP.net VB Timers

I would like to be able to time a page load time in ASP.net (VBscript). Adding Trace="true" to the page directive is nice, but I need to actually time an event and store it in a variable. In ASP it was easy with the Timer object, but in .net I can't find anything on Google. I need something along the lines of: Dim startTime Dim endTi...

What is an appropriate page processing time for a web application?

I'm working on a web application, and it's getting to the point where I've got most of the necessary features and I'm starting to worry about execution speed. So I did some hunting around for information and I found a lot about reducing page load times by minifying CSS/JS, setting cache control headers, using separate domains for static ...

Timing function in python not giving accurate result

Dear All i have developed a scheme for signcryption, i want to test the time taken for modular exponentiation. i am using the below code for signcryption part start = time.clock() gamma = pow(g , x, p) print ('The value of gamma is : '),gamma Time_signcrypt = time.clock() - start and for unsigncryption part i am calculating the t...

Delay before sending message over socket - how does that help?

I have a tcpip socket interface to a third party software app. I've implemented this interface for several customer sites with no problem. The latest customer, though... problems. We've turned on logging in the apps on either end, and also installed Wireshark on the PC to log raw tcpip traffic. With that, we've proved that my server ...

jQuery - running a function before document.ready... but not too early

I have a page which contains a div which must be resized via JS when a page loads. In order to do that I give it a "default width" of 760px and then run the following code: function resizeList() { var wlwidth,iwidth,nwidth; wlwidth = document.body.clientWidth - 200 - 60; iwidth = 320; nwidth = Math.floor(wlwidth / iwidt...

Run a function each tick in Twisted

I'm using the twisted framework, and I need to keep track of how much time has passed since an event has started, and perform an action when a certain amount has passed. The best way to do that seems to me to be to check against a time-stamp each tick of the reactor. If it is the best way, how do I do it? If it isn't, what's a better w...

My function takes negative time to complete. What in the world happened?

I'm posing this question mostly out of curiosity. I've written some code that is doing some very time intensive work. So, before executing my workhorse function, I wrapped it up in a couple of calls to time.clock(). It looks something like this: t1 = time.clock() print this_function_takes_forever(how_long_parameter = 20) t2 = time.clock...

Turbo C time resolution up to milliseconds

The clock_t implications in time.h released with Turbo C++ v1.01 are good only up to 0.0545XX seconds, meaning any timing I want to do with higher precision is impossible with that library. I was wondering if anyone knew a good library or method available to elder TurboC++ that I could use instead of time.h calls for better precision? ...

can the execution of statements in Python be delayed?

I want it to run the first line print 1 then wait 1 second to run the second command print 2, etc. Pseudo-code: print 1 wait(1 seconds) print 2 wait(0.45 seconds) print 3 wait(3 seconds) print 4 ...

Instruction timing on ARM Cortex-m3 (Specifically LPC1343)

I'm looking to write some very timing sensitive code on an LPC1343 where I need to count exact clock cycles. There are two issues :- I've read that code executing from the internal flash memory isn't always able to run at the full 72Mhz and wait states might be introduced. But I can't find any "official" document about this. I saw one ...

millisecond timing in java

I time various transactions in my Java application. At the start of the transaction, I get a start time by instantiating a Calendar and then getting the hour, minute, second, and millisecond. I complete the transaction, instantiate a new Calendar and get a new hour, minute, second, and millisecond. My reasoning is that the differ...

How can I measure the build time for each component of a scons build?

I have a big C++ project that is built using scons. Its building slow and I want to make some changes to try to make it build faster. Now I'd like to focus my time speeding up the parts of the build that are slowest. How can I work out which files are taking the longest to compile? ...

jquery getJSON function timing issue

I think my program is skipping result of JSON call. Is it possible to make a closure function here or make the program wait for JSON call to return? function username_not_duplicate(username) { var function_name = "get_username"; var parameters = [username]; var url = "/get_functions.php?function_name=" + function_name + "&param...