[haiku-bugs] Re: [Haiku] #2412: [Time] Integrate NTP client

  • From: "leavengood" <trac@xxxxxxxxxxxx>
  • Date: Fri, 14 Jan 2011 16:56:37 -0000

#2412: [Time] Integrate NTP client
--------------------------------------+------------------------------
  Reporter:  diver                    |        Owner:  leavengood
      Type:  enhancement              |       Status:  assigned
  Priority:  normal                   |    Milestone:  R1
 Component:  Preferences/Time & Date  |      Version:  R1/Development
Resolution:                           |     Keywords:
Blocked By:                           |  Has a Patch:  0
  Platform:  All                      |     Blocking:
--------------------------------------+------------------------------

Comment (by leavengood):

 Replying to [comment:8 axeld]:
 > I disagree - while the periodical execution is indeed out of the scope,
 we still need a standalone mechanism for it to update the time. We could
 then update the time once after booting, for now at least. I think the
 easiest way to accomplish that would be to add a command line option to
 Time that only updates the time without showing an UI. However, this will
 bring the Time entry to the Deskbar -- so I guess the best option would be
 to have a separate CLI tool that actually does the work (and that can read
 the settings, too). It could be loaded by Time as an add-on, or just
 started via system().

 OK, that is a reasonable suggestion. I guess the easiest thing would be to
 just extract out the GUI of NetworkTime as I suggested before, but leave
 the command-line code as a new bin program, network_time. The Time preflet
 could write out settings which the network_time command line program could
 read (they could share the same settings class with the right options in
 the Jamfile), while there could still be the option to override those
 settings with command-line options. When the "Update" button is pressed in
 the Time preflet it will just use system() to run network_time. Then
 network_time could be called at the end of the Bootscript to set the time
 as Axel says.

 Then if one day we have a scheduled tasks system network_time can also
 just be called from that in whatever frequency the user wants.

 The only problem I see with this approach is that it will be harder to use
 a progress bar in the Time preflet if the network_time command is actually
 doing all the work. Though in my experience the operation was always so
 fast the progress bar wasn't really needed.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/2412#comment:9>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: