Sample settings, Start/stop/refresh of the sntp client – Micro Innovations M000174-19 User Manual

Page 67

Advertising
background image

Windows CE

Programs

M000174-19

67

7.10.2 S

AMPLE

S

ETTINGS

The settings for the SNTP client can be set as follows in a

REG file

(see also chapter

Autoexec.reg

):

[HKEY_LOCAL_MACHINE\Services\TIMESVC]

"server"=multi_sz:"swisstime.ethz.ch","thrad.cybernet.ch"
"AutoUpdate"=dword:1
"ServerRole"=dword:0
"refresh"=dword:927C0
"recoveryrefresh"=dword:57E40
"threshold"=dword:5265C00

Notes on the above example:

• The entries with «dword» are in hexadecimal format.
• "refresh"=dword:927C0

corresponds

to 10 minutes in milliseconds (10*60*1000)

• "recoveryrefresh"=dword:57E40

corresponds to 6 minutes in milliseconds (6*60*1000)

• "threshold"=dword:5265C00 corresponds

to 1 day in milliseconds (24*60*601000)

The settings for the SNTP client can be stored in a REG file SNTP.REG and started in the
Autoexec.bat file as follows:

REM Verify boot device, if parameter is not

REM available, the boot device is StorageCard

SET bootdev=StorageCard

IF "%1" == "" GOTO START

SET bootdev=%1

IF exist \%bootdev%\sntp.reg CALL regedit.exe "\%bootdev%\sntp.reg" "/Q"

services.exe refresh NTP0:

7.10.3 S

TART

/S

TOP

/R

EFRESH OF THE

SNTP

C

LIENT

The SNTP client is started by default. The values for a time synchronization are not set in the default
setting.

The SNTP client is prepared by setting the appropriate registry entries. The services.exe program
transfers the new registry entries to the SNTP client. The possible command line calls are listed in the
table below:

Functionality

Call

Restart of the SNTP client with actual registry
entries

Services.exe refresh NTP0:

Start

Services.exe start NTP0:

Stop

Services.exe stop NTP0:

Status: Display of the current status

Services.exe list

Advertising