dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: synchronizing time

Re: synchronizing time

From: victor rajewski <>
Date: Mon, 24 Sep 2007 00:23:25 +1000

On 9/23/07, victor rajewski <> wrote:
> Looking through the archives, I saw a plugin that syncs the time when
> the device is plugged in to a computer. It seems to be a bit old, and
> I think there's a better way:
> 1) The device has to be on to start with. The USB is plugged in, and
> the device notices this and makes a file indicating the time the
> connection was made with respect to the device's clock
> 2) When the computer (either via an automatically run script such as
> autorun in windows or via HAL in linux) notices the device has been
> plugged in immediately writes a file to indicate when the connection
> was made with respect to the computer's clock.
> 3) When the device resumes normal operation, it works out the time
> difference and its own clock accordingly.

After going a bit nuts with the old text editor, I've made a
rudimentary implementation of this. I'll post the patch shortly. At
the moment I'm writing the time to a file on both the rockbox and PC,
but it would be slightly nicer to access the file creation times from
the filesystem instead. Unfortunately I can't find a function to do
this - does one exist, and if not, where would I start looking for


Received on 2007-09-23

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy