Programming :: Delay Calculation For LSB In Timer?

Sep 5, 2010

On the following link Following code is given

Code:
loopbit = loops_per_jiffy;
/* Gradually work on the lower-order bits */
while (lps_precision-- && (loopbit >>= 1)) {
loops_per_jiffy |= loopbit;
ticks = jiffies;
while (ticks == jiffies); /* Wait until the start

[Code]...

View 2 Replies


ADVERTISEMENT

Programming :: Complex Math Calculation In Shell Script?

Feb 16, 2010

Here is my situation:I have a series of .plt files that are geared for a device that has it's xy origin at the lower left of the paper however some devices use the center of the paper as it's origin in a piped shell script how can I convert this file to a center origin plot file?Here are some knowns: the existing file always Lower Left 0.0 the existing file max xy is the page upper right x.x the desired output file must have it's 0.0 at the exact center of page (page size will vary). Ideas: Based on the sample files included maybe use PU and PD as the triggers for inputs to be calculated as any other commands have nothing to do with coordinates.

View 14 Replies View Related

Programming :: Timer In Socket Programming - Wait For X Sec After Read() And Then Disconnect The Client Connection

Mar 8, 2011

I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.

View 3 Replies View Related

Programming :: Socket And Timer Programming - Server Doesn't Execute Any Msg Which Client Sent

May 16, 2011

i have a server program which accept multiple client connection and am using polling. like every 2 secs it will look to client whether any data is received after it binded. i have used setitimer but there is runtime error i got.. the server accept all client connection but doesn't execute any msg which client sent.

#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netdb.h>
#include<unistd.h>
#include<pthread.h>
#include<string.h>
[Code]....

View 1 Replies View Related

Programming :: GNU C - Timer Not Executing

Mar 3, 2011

Why is the timer not executing?

Code: #include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <pthread.h>
void func(union sigval sv)
[Code]....

View 1 Replies View Related

Programming :: 30 Minute Timer In Bash

Jun 8, 2011

I've recently started coding in bash and I'm making a diagnostic check CD for rackmounted computers to print out to an LCD screen. So far it works but what i want it to do is, when it checks what ethernet ports are unplugged, it stays there for 30 minutes or so and proceeds through the script. I've looked up cron and that seems to be useful for making timers on permanent systems but I just want the cd to boot, do the check and then eject it and let the real OS take over and I've also tried using:

while [ `sleep 30m` ];
do
<script>

with no luck. Is there any command I can use to do this? I've noticed a few examples where people have captured the time and then used a while less than/greater than statement but I'm not sure how to do this. Is it possible to do a concept like:

while [ %current time -lt %current time+30 min ];
do
<script>

View 8 Replies View Related

Programming :: Generating Timer Interrupts In C?

Jul 23, 2010

I'm trying to understand how interrupts work. Is there a way to generate timer interrupts in C. Also can we enter into the protected mode of the CPU. Does OS (specifically, linux) place any restrictions on user programs entering protected mode. If it does not, do we just have an assembly language program which changed the mode, followed by the C code... I'm just trying to understand how things work at the lowest level. So I'm trying to write few snippets to test my understanding.

View 3 Replies View Related

Programming :: Timer Of 10 Ms For Read / Write A USB Device?

Apr 13, 2011

I need programmer a timer of 10 ms for read/write a USB device

View 4 Replies View Related

Programming :: Dynamic (kernel) Timer Never Is Started Again

Jan 26, 2010

My system: Ubuntu 2.6.31. Language C, compiler: gcc I am running dynamic timer as a kernel module and my issue is that the once the timer overflows, the program finishes. On the other hand i have forced to arm the timer again because of a while loop but the timer never is started again. i am targetting a periodic timer but it runs once and thats it.

[Code]...

View 1 Replies View Related

Programming :: Implement A Timer Expiry Function

Jan 17, 2010

I'm implementing a TCP protocol. TCP implementation requires to send packets continuously and if the receiver doesnt respond after a particular interval of time it should resend the packet again. I need some method to implement a timer expiry function. How can I implement it? Should i implement threads (If yes can you please give a sample)? or is there any better method? I'm implementing it in a Unix system.

View 3 Replies View Related

Ubuntu Installation :: Post-GRUB 2 Delay - Troubleshoot This And Determine What Is Causing The Delay

May 11, 2011

After GRUB 2 comes up (I'm running Ubuntu 10.10) and I choose the OS to boot, there is about a 5 second delay where nothing appears to happen after I make the selection -- no disk activity. It happens consistently every time I boot. Again, this is after I choose the OS to boot, so it shouldn't have anything to do with the standard delay to allow me to choose the appropriate OS.Is there a good way to troubleshoot this and determine what is causing the delay?

View 4 Replies View Related

General :: User Add With UID Calculation?

Aug 27, 2010

I am having problems with the useradd command. When I call "useradd someuser" the program starts and never finish. When I give the UID option (useradd -u ) sometimes it works properly, but with some UID's that aren't in /etc/passwd it shows a message saying that the uid is not unique. I checked out /var/log/auth.log and nothing about the command is being logged. It seems that the command is not calculating the new UID prperly.It's running on a Debian Linux 2.6.26-2-686 i686 GNU/Linux

View 6 Replies View Related

Red Hat / Fedora :: Getting Top Command Memory Calculation?

Mar 21, 2011

I am running a 64 bit RHEL 4 in one of mymachines with 8 Gb of physical memory.But when I run the top command, it outputs as below:
Code:

Mem: 8165428k total, 8109988k used, 55440k free, 65772k buffers
Swap: 4194296k total, 135596k used, 4058700k free, 6739936k cached On calculation, it shows it has only 7.7 Gb of memory if I calculate ( using 1 Gb = 1024*1024 Kb).

Where is .3Gb gone ? Again, it is a 64 bit machine..so should see all 8Gb. Is it mistake of top command calculating 1Gb=1024*1000Kb ?

View 7 Replies View Related

Ubuntu :: Upgrading From 10.04 To 10.10 - Error Upgrades Calculation Is Not Possible

Mar 3, 2011

I got an error Upgrades calculation is not possible An unresolvable problem occurred while calculating the upgrade: E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. This can be caused by:

* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu

View 7 Replies View Related

Networking :: Subnet - Network IP - Broadcast IP Calculation

Feb 14, 2010

I am basically from system side and often confused about the calculation of the IP addresses.Just i want to know that what how can i calculate the following of a IP Address:

(1) Available IP in a Network
(2) Broadcast IP
(3) Network Prefix or Net Mask

View 5 Replies View Related

General :: Instant Cpu Load Calculation On Ubuntu?

May 31, 2011

i am working on a model based on cpu load / cpu usages. where i need the instant cpu usage/cpu load, but i can able to find the cpu load average for last 1 , 5 or 15 minutes. Is there any command or any software by which i can able to find out that?

View 2 Replies View Related

Software :: Command Line Program For IP Calculation?

Apr 8, 2011

ipcalc isn't the one I am thinking of. I remember another one that was a bit better, with more options -- easier to use.I remember that if you gave it a CIDR network /23 and an IP, it would list all of the address ranges, network, broadcast for that network..

View 2 Replies View Related

General :: Calculation Of Working Time Based On System Uptime

Jul 28, 2010

I know several tools that allow tracking time spend on different tasks / projects.Is there any existing tool for very very simplified work-time-tracking.I am an employee, come to the office, switch on my laptop directly. I have mostly around 1 hr lunchtime, but sometimes less, sometimes more.At around 18:00 I want to type one command in the console (or simple GUI would also be okay of course) that tells me:"1 hour overworked. Go home now! (came at 8:00, 1 hour standard lunch-break)."

View 1 Replies View Related

Software :: First Timer - How Does It Work

Jul 22, 2009

This is my first time of trying this software even though i have not started using it i would like to have an incite on issues like initial setup, running programs and even solutions to problems with driver to run others had ware that if any at all just a guid before i install it and start using.

View 3 Replies View Related

Fedora Security :: Automatic Log Off Timer In F10?

Mar 10, 2009

F10 logs off a user when idling after a certain time. I cannot find the place where to set the time and other things (like to disconnect from network at logoff etc). where to set this? I didn't find it in neither 'power management' or 'users + groups'.

View 3 Replies View Related

Ubuntu :: No Timer In The Restart Window?

May 7, 2010

I may be wrong but I remember when I would go to restart my computer, a window would appear with a coundown clock starting at I think 60 seconds. I don't see this in Ubuntu 10.04. How can I get this back? Is there a setting in the Configuration editor or something similar?

View 8 Replies View Related

Ubuntu :: Set The Timer For Dual-boot?

Jul 7, 2010

I've installed Linux Ubuntu 10.04 LTS on my computer, and the Dual-booting shows after starting the computer

But what I need to know is how do you set the timer so that if I don't press "Enter"...that it choses my preferred operating system in a certain period of time (seconds or minutes...etc) by itself?

View 1 Replies View Related

Ubuntu :: Set The User Inactivity Timer To A Different Value In 10.04?

Jul 14, 2010

How do I set the user inactivity timer to a different value in 10.04? It seems to be set by default to a very short time.

View 1 Replies View Related

Ubuntu :: 11.04 Timer-applet Replacement?

Apr 29, 2011

Anyone know of a possible replacement for the Gnome timer applet?

View 8 Replies View Related

CentOS 5 :: PXE Menu Timer Not Working?

Mar 20, 2009

I converted a PXE boot environment to CentOS 5.2 (64 bit). It is used to install various flavors of Linux. The default timer within the menu is configured for 10 seconds. Can anyone recommend a version of syslinux that is compatible with CentOS 5.2 (x86_64) in which the menu timer issue has been resolved?

View 8 Replies View Related

Fedora :: Timer Function Through Command Line?

Jan 13, 2010

I've been working in a program in BASH and would like to measure its efficiency in different machines. Of course I am able to display the date at the beginning and at the end of its execution, but I'd rather use some sort of timer function to measure in seconds its speed. Is there any timer function available through command line?

View 6 Replies View Related

Ubuntu :: Set The Timer For The Dual-boot Menu?

Jul 8, 2010

I installed Windows, then Ubuntu, but I don't know how to set the timer for the Dual-boot menu to start at Windows firstOn my Laptop, Ubuntu is set to run first and it's set to start after 10 secondsBut I wasn't the one who installed Ubuntu on my Laptop, it was someone else...etc. So I don't really know how to do the thingI want to set the Dual-boot so that Windows bee's the first one to start loading, at a timer of 1 minute

View 9 Replies View Related

Ubuntu :: Getting A App That Is A Countdown Timer Usable For Basketball

Jul 17, 2010

I'm looking for an app that will provide a large (full screen and clear) display countdown clock, basically so I can use my laptop in public to show how much time remains in a basketball quarter. I'm the official timer.If it counts up like in soccer rather than down, that's fine too. If the app can also show the score, that would be great, but it is not a requirement. We don't use a shot clock, so that is not required either.

View 8 Replies View Related

General :: Shell Script - Countdown Timer

Feb 16, 2010

I'm looking to write a shell script that is a count down counter for my brothers birthday, hopfully something that when the big day comes it pops up and says " happy birthday"

something that wont get screwed up if the computer is restarted...

View 6 Replies View Related

Server :: Tomcat 6 Error: Timer Already Cancelled

Jun 15, 2010

I started seeing error log entries to this effect once we ported a Tomcat webapp, which connects to a remote database, from Tomcat 5 to Tomcat 6.0.26, but it seemed relatively harmless until now. The error we got at first was:

Code:

May 5, 2010 2:36:44 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesStopTimerThread

SEVERE: A web application appears to have started a TimerThread named [Timer-7] via the java.util.Timer API but has failed to stop it. To prevent a memory leak,the timer (and hence the associated thread) has been forcibly cancelled. A restart seemed to cure the server at that point. But now it has died silently: though the process itself was running, the service become unavailable. Entries like this were found in the logs:

Code:

06/15/10 15:05:47.685 EDT -0400 id=1 Error acquiring database:
java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:354)

[code].....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved