in reply to Re: Any ideas for using perl as a simple pulse generator?
in thread Any ideas for using perl as a simple pulse generator?
Excellent description. Just out of curiosity, I tried your second example on my idle system (linux, newer AMD quad). It used <2% cpu and showed 2-3 *microsecond* precision:
1279058169.099145 1279058169.599145 1279058170.099145 1279058170.599144 1279058171.099144 1279058171.599144 1279058172.099146 1279058172.599144 1279058173.099145 1279058173.599144 1279058174.099145 1279058174.599146 1279058175.099144 1279058175.599145 1279058176.099146 1279058176.599145 1279058177.099145 1279058177.599144
Then I started two fsck processes and 4 prime number searching threads which overtax all CPUs and FPUs. I got this:
1279057824.4011 1279057824.9012 1279057825.4012 1279057825.9011 1279057826.4012 1279057826.9012 1279057827.4012 1279057827.9012 1279057828.4011 1279057828.9011 1279057829.4012 1279057829.9011 1279057830.4012 1279057830.9012 1279057831.4030 1279057831.9012
Which still looks like 1-2 millisecond precision. This is of course much better than I need. I don't know how valid those tests are, though, so I'll have to read up on the linux kernel schedulers.
Any tips for code to do the actual writing? I'll probably use the autoflush=1 example posted in the thread.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Any ideas for using perl as a simple pulse generator?
by BrowserUk (Patriarch) on Jul 13, 2010 at 23:08 UTC | |
|
Re^3: Any ideas for using perl as a simple pulse generator?
by JavaFan (Canon) on Jul 14, 2010 at 07:40 UTC |