So I've come across a gnarly issue with gettimeofday() on Linux. I'm posting this blog hoping that if someone else comes across it and Google's it, you'll contact me and we can compare notes.
Ive got a daemon running that aggregates ZigBee Wireless Sensors. It pretty much spends most of its time checking to see how long its been since a node has sent it a packet. The call to gettimeofday occurs many times a second in the main loop. Ive got this running on a few systems and every couple of days gettimeofday returns a negative value and I write these messages to the syslog.
2011-11-14 12:36:22 Daemon.Error Time then invalid tv_sec = [-1] <= 0 (time now tv_sec = [1321292182])
and
2011-11-16 09:28:34 Daemon.Error Time now invalid tv_sec = [-524288] <= 0, (time then tv_sec = [1321453659]) timeDelta 1848
I'm doing a little reading into how the clock and time functions work on my kernel. I'm using a custom port of version 2.6.12 on a Freescale PowerPC.Im using gcc 3.4.2, with uClibC
Thursday, November 17, 2011
Thursday, April 7, 2011
Saturday, March 26, 2011
GracePotterAndTheNocturnals
GracePotterAndTheNocturnals:
"1. Paris (Ooh La La) - Grace Potter and the Nocturnals
2. Oasis - Grace Potter and the Nocturnals
3. Medicine - Grace Potter and the Nocturnals
4. Goodbye Kiss - Grace Potter and the Nocturnals
5. Tiny Light - Grace Potter and the Nocturnals
6. Colors - Grace Potter and the Nocturnals
7. Only Love - Grace Potter and the Nocturnals
8. Money - Grace Potter and the Nocturnals
9. One Short Night - Grace Potter and the Nocturnals
10. Low Road - Grace Potter and the Nocturnals
11. That Phone - Grace Potter and the Nocturnals
12. Hot Summer Night - Grace Potter and the Nocturnals
13. Things I Never Needed - Grace Potter and the Nocturnals"
"1. Paris (Ooh La La) - Grace Potter and the Nocturnals
2. Oasis - Grace Potter and the Nocturnals
3. Medicine - Grace Potter and the Nocturnals
4. Goodbye Kiss - Grace Potter and the Nocturnals
5. Tiny Light - Grace Potter and the Nocturnals
6. Colors - Grace Potter and the Nocturnals
7. Only Love - Grace Potter and the Nocturnals
8. Money - Grace Potter and the Nocturnals
9. One Short Night - Grace Potter and the Nocturnals
10. Low Road - Grace Potter and the Nocturnals
11. That Phone - Grace Potter and the Nocturnals
12. Hot Summer Night - Grace Potter and the Nocturnals
13. Things I Never Needed - Grace Potter and the Nocturnals"
Tuesday, February 8, 2011
I love PHP
So, a friend asked me to whip up a website for him that would allow him to enter some data into forms, and later output those forms into a document. He's not a techie guy, and just wants a nice simple website. In about half a day Id gotten a working prototype together using phpMyAdmin, and just some simple cut and paste PHP code. Im a programmer by trade, but haven't done Web Front End stuff in a long time, and have a zero dollar budget, so its code it by hand using freeware. I can't say enough good things about PHP, while I'd worked with it before, I just dusted it off and bang, job done. While I know Ruby On Rails and Servlets and ASP.net and x and y and Z are all good too, just thought Id throw out props to your old pal, PHP and MySQL.
UPDATE: 9 years later, PHP is still hand-dandy-super-duper for quick web work, and cheap web-hosting that doesn't like Application Containers running all the time love supporting it because its light weight and not sucking up cycles...
Monday, January 24, 2011
Katz's Deli New York City
Yesterday I had the pleasure of eating at Katz's Deli in New York City. I do not get to New York very often, and had never heard of Katz's until very recently. I am a member of the Yankee Beemers Motorcycle club, and I was in the city for the International Motorcycle Show at the Jacob Javitz Center. The club is a large group of well organized motorcycle enthusiasts. We filled up a tour bus and left from Franklin Mass to see the show, and eat at Katz's. Upon arriving at the intersection of 2nd and 7th, we all walked together, about 30 of us, to the deli which was about a mile from where we got dropped off. My girlfriend on crutches was quite a trooper.
When you see the neon sign outside, you know you made it there. We walked in thru a turn style and handed a ticket. The ticked had some mysterious numbers on it, and you wait at various counters to be served. Behind the counters sandwich makers were furiously slicing corned beef, pastrami, and brisket. There were sausages and salamis for sale, and a gentleman walked by me with an entire tray full of the golden brown steak fries..
I had the corned beef. It was delicious. I think there must have been a pound of meat on it. The guy who made it offered me the choice of lean or fatty, and I said both. a smear of mustard on both sides ,and a handful of home made picked cucumbers and tomatos...
When you see the neon sign outside, you know you made it there. We walked in thru a turn style and handed a ticket. The ticked had some mysterious numbers on it, and you wait at various counters to be served. Behind the counters sandwich makers were furiously slicing corned beef, pastrami, and brisket. There were sausages and salamis for sale, and a gentleman walked by me with an entire tray full of the golden brown steak fries..
I had the corned beef. It was delicious. I think there must have been a pound of meat on it. The guy who made it offered me the choice of lean or fatty, and I said both. a smear of mustard on both sides ,and a handful of home made picked cucumbers and tomatos...
Wednesday, January 5, 2011
Subscribe to:
Comments (Atom)