Toon posts:

Klok loopt steeds 5 minuten voor

Pagina: 1
Acties:
  • 318 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
Mijn systeemklok loopt elke dag zo'n 5 minuten voor. Ook al zet je de klok goed, toch is het elke dag weer mis.

Wie kan mij helpen?

  • RealCato
  • Registratie: Juli 2000
  • Laatst online: 07-06 08:36
StatBar downloaden en hem laten synchroniseren met atoomklok :)

Rijtjeshuis 170 m^2 uit 1955, bij renovatie in 2022 dak/vloer/spouwisolatie, overal HR++, vvw benedenverdieping, 7x Jaga Strada en 2 handdoekradiatoren met Tado’s. Quatt hybrid op dakkapel sinds einde 2023.


Verwijderd

of D4Time van www.thinkman.com
Kan je ook je tijd op bepaalde intervallen laten synchroniseren. Heel klein en heel effectief programma.

edit:
typo

Verwijderd

Zit je toch niet op een netwerk, waarbij tijdens het aanmelden jouw klok gesynchroniseerd wordt met een server ?

  • xiphoid
  • Registratie: Augustus 2000
  • Laatst online: 10-10-2023

xiphoid

I am just me

Ik heb een script geschreven, voor mIRC 5.91
gooi hieronder in een sync.mrc file en zet deze in je mirc/ installed dir. Om hem vervolgens te laden door: /load -rs sync.mrc
Het commando: /sync is nu toegevoegd en deze geeft ook kort overzicht van de mogelijkheden.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
;
; Sync section
;

;=====================
; sync by floris & rno
; idea by cabber
; for mIRC 5.91 only
; [floris@creations.nl]
; [rno@creations.nl]
; [cabber@creations.nl]
;=====================

; check for mirc 5.91 and display credits
; check for use of NT, if so, unload
on 1:load: {
  unset %sync.script.version
  set %sync.script.version 1.41
  if ($version < 5.91) {
    echo -a  ____________________________________________________________
    echo -a | ERROR!! /sync can't be loaded in versions of mirc < 5.91
    echo -a | Unloading sync stuff. .. Sorry ..
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    unset %sync.script.version
    unload -rs $script
    halt
  }
  ; check for running windows nt, if so, halt 
  if ($os == NT) {
    echo -a  ____________________________________________________________
    echo 4 -a | WARNING!! /sync attempts to set the system date/time
    echo 4 -a | On Windows NT you may not have permission to do this
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  }
  echo -a  ________________________________________________
  echo -a | /sync
  echo -a | author, floris/rno/cabber - version, %sync.script.version
  echo -a | Syntax: /sync help for more details
  echo -a | mail, sync@creations.nl
  echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
}
; end

; new mIRC command - /sync
alias sync {
  ; check if the command entered was /sync server
  if ($1 == server) {
    ; check if the command entered was just /sync server, if so, display /syn server help
    if ($2 == $null) {
    echo -a  ________________________________________________
    echo -a | Error
    echo -a | Syntax: /sync server <ip address> (nummeric)
    echo -a | Example: /sync server 194.109.6.65 (default)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    halt
    }
    ; check if the value entered for /sync server was a valid ip address, if not, display error/help
    if ($isnumip($2) == $false) {
    echo -a  ________________________________________________
    echo -a | Error
    echo -a | Only numeric ip addresses are allowed to be used
    echo -a | and range from 0.0.0.0 >< 255.255.255.255
    echo -a | Example: /sync server 194.109.6.65 (default)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    halt
    }
    ; check if the value entered for /sync server was a valid ip address, if so, set new server ip for future use
    if ($isnumip($2) == $true) {
    echo -a  ________________________________________________
    echo -a | sync
    echo -a | $chr(91) $+ OK $+ $chr(93) New time server ip set to: $2
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    set %sync.server $2
    halt
    }
    halt
  }
  ; check if the command entered was /sync port
  if ($1 == port) {
    ; check if the value for /sync port is numeric, if not, display error/help
    if ($2 !isnum) {
    echo -a  ________________________________________________
    echo -a | Error
    echo -a | Syntax: /sync port <port number> (numeric)
    echo -a | Example: /sync port 13 (default)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    halt
    }
    ; check if the value for /sync port is numeric, if so, set new port for future use
    if ($2 isnum) {
    echo -a  ________________________________________________
    echo -a | sync
    echo -a | $chr(91) $+ OK $+ $chr(93) New port number set to: $2
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    set %sync.port $2
    halt
    }
  }
  ; check if the command entered was /sync default, if so, set the default settings for the server and port
  if ($1 == default) {
    echo -a  ________________________________________________
    echo -a | Default
    echo -a | - server [set to default] (194.109.6.65)
    echo -a | - port [set to default] (13)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    set %sync.server 194.109.6.65
    set %sync.port 13
    halt
  }
  ; check if the command entered was /sync credits, if so, display the credits.
  if ($1 == credits) {
    echo -a  ________________________________________________
    echo -a | Credits Sync.mrc v. %sync.script.version
    echo -a | - floris [floris@creations.nl] (it is a dirty job, but somebody had to bloody do it)
    echo -a | - rno [rno@creations.nl] (without rno it would be .. well, not working)
    echo -a | - cabber [cabber@creations.nl] (the man with the plan)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    halt
  }
  ; check if the command entered was /sync help, if so, goto help.section and display
  if ($1 == help) {
    goto help
  }
  ; check if the command entered was /sync time, if so, continue
  if ($1 == time) {
    set %sync.is.time on
    ; check if there is a value set for the server, if not, set default server
    if (%sync.server == $null) {
    set %sync.server 194.109.6.65
    }
    ; check if there is a value set for the port, if not, set default port
    if (%sync.port == $null) {
    set %sync.port 13
    }
    ; we have a server and port, the command was /sync time, so open a socket and do ya thing
    sockopen at %sync.server %sync.port
    set %sync.show off
    ; i assume we do not want to continue, so here is a good point to halt,
    ; the rest of the script are events, so they will start up the proggy again..
    halt
  }

  ; check if the command entered was /sync date, if so, continue
  if ($1 == date) {
    set %sync.is.time off
    ; check if there is a value set for the server, if not, set default server
    if (%sync.server == $null) {
    set %sync.server 194.109.6.65
    }
    ; check if there is a value set for the port, if not, set default port
    if (%sync.port == $null) {
    set %sync.port 13
    }
    ; we have a server and port, the command was /sync date, so open a socket and do ya thing
    sockopen at %sync.server %sync.port
    set %sync.show off
    ; i assume we do not want to continue, so here is a good point to halt,
    ; the rest of the script are events, so they will start up the proggy again..
    halt
  }

  ; check if the command entered was /sync show, if so, continue
  if ($1 == show) {
    if ($2 == time) {
    set %sync.is.time on
    goto go
    }
    if ($2 == date) {
    set %sync.is.time off
    goto go
    }
    if ($2 == $null) {
    echo -a  ________________________________________________
    echo -a | Error
    echo -a | Syntax: /sync show <time|date>
    echo -a | Example: /sync show time (this will display current system time & sync time)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    halt
    }
    if (($2 != date) || ($2 != time)) {
    echo -a  ________________________________________________
    echo -a | Error
    echo -a | Syntax: /sync show <time|date>
    echo -a | Example: /sync show time (this will display current system time & sync time)
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    halt
    }
    :go
    ; check if there is a value set for the server, if not, set default server
    if (%sync.server == $null) {
    set %sync.server 194.109.6.65
    }
    ; check if there is a value set for the port, if not, set default port
    if (%sync.port == $null) {
    set %sync.port 13
    }
    ; we have a server and port, the command was /sync show, so open a socket and do ya thing
    sockopen at %sync.server %sync.port
    set %sync.show on
    ; i assume we do not want to continue, so here is a good point to halt,
    ; the rest of the script are events, so they will start up the proggy again..
    halt
  }
  ; end sync show
  ; check if there is any command given for the /sync command, (/sync [enter]), if so, goto help.section and display the help screen
  if ($1 == $null) {
    goto help
  }
  ; i think this is the spot to put the last option.. the remaining commands for /sync *
  ; if this, then do that, else... it is not a valid command...
  else {
    echo -a  ________________________________________________
    echo -a | Error
    echo -a | Command not supported; try /sync help
    echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    ; we dont want to continue at all, halt here 
    halt
  }
  ; the above bracket is for else {}

  ; the help.section, used for /sync and /sync help
  :help
  echo -a  ________________________________________________
  echo -a | Help Sync.mrc v. %sync.script.version
  echo -a | - /sync  [displays this help screen] (yes, it is the same as /sync help)
  echo -a | - /sync time [sync system to match atom-time] (yes, the dos box is normal)
  echo -a | - /sync date [sync system to match atom-date] (yes, the dos box is normal)
  echo -a | - /sync server <ip address> [lets you set a new numeric ip address] (default = 194.109.6.65)
  echo -a | - /sync port <number> [lets you set a new numeric port] (default = 13)
  echo -a | - /sync show time [displays current system time & sync time] (doesn't alter your system time)
  echo -a | - /sync show date [displays current system date & sync date] (doesn't alter your system date)
  echo -a | - /sync default [resets the server & port settings to their defaults] (194.109.6.65:13)
  echo -a | - /sync credits [displays the credits screen] (glory to us, ok!)
  echo -a | - /sync help [displays this help screen] (d0h)
  echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
}
; end

; display line if socket connection is opened
on *:sockopen:at:{
  echo -a  ________________________________________________
  echo -a | sync
  echo -a | $chr(91) $+ OK $+ $chr(93) connection $chr(91) $+ %sync.server $+ $chr(58) $+ %sync.port $+ $chr(93) established
}
; end

; display line if socket connection is closed
on *:sockclose:at:{
  echo -a | $chr(91) $+ OK $+ $chr(93) connection $chr(91) $+ %sync.server $+ $chr(58) $+ %sync.port $+ $chr(93) closed
  echo -a  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
}
; end

; get the info from the server and sync the system
; yes, the dos box appears, we know that
on *:sockread:at:{
  if ($sockerr > 0) return
  :nextread
  sockread %temp
  if ($sockbr == 0) return
  if (%temp == $null) %temp = -
  if (%sync.is.time == on) {
    if (%sync.show == off) {
    echo -a | System time will be set to: $extractdatetime(%temp, t)
    run command /c time $extractdatetime(%temp, t)
    }
    if (%sync.show == on) {
    echo -a | System time: $time
    echo -a | Sync time: $extractdatetime(%temp, t)
    }
  }
  if (%sync.is.time == off) {
    set %sync.date.dow $extractdatetime(%temp, w)
    set %sync.date.month $extractdatetime(%temp, m)
    set %sync.date.day $extractdatetime(%temp, d)
    set %sync.date.year $extractdatetime(%temp, y)
    ; displaying sync time according to command show/date sync/date
    if (%sync.show == off) {
    echo -a | System date will be set to: %sync.date.dow $+ $chr(44) %sync.date.day %sync.date.month %sync.date.year
    ;transform to proper format so that DOS/Windows can understand
    set %sync.date.date %temp
    %sync.date.date = $ctime(%sync.date.date)
    %sync.date.date = $asctime(%sync.date.date, dd-mm-yy)
    run command /c date %sync.date.date
    }
    if (%sync.show == on) {
    echo -a | System date: $asctime(dddd) $+ $chr(44) $asctime(dd mmmm yyyy)
    echo -a | Sync date: %sync.date.dow $+ $chr(44) %sync.date.day %sync.date.month %sync.date.year
    }
    ; end
  }
  goto nextread
}
; end

alias  -l isnumip {
  set %buffer $1
  if ($len(%buffer) > 15) { goto end }
  if ($count(%buffer, $chr(46)) != 3) { goto end }
  if ($left(%buffer,1) == $chr(46)) || ($right(%buffer,1) == $chr(46)) { goto end }
  if (.. isin %buffer) { goto end  }
  set %i 1
  while (%i <= 4) {
    if ($gettok(%buffer,%i,46) > 255) { goto end }
    inc %i
  }
  ;it seems we have valid syntax so far, check if it is numeric 
  ;(some of this checking has already been done implicitly, but this is the easy way)
  set %i 1
  while (%i <= $len(%buffer)) {
    if ($mid(%buffer,%i,1) !isnum) && ($mid(%buffer,%i,1) != $chr(46)) { goto end }
    inc %i
  }
  unset %i, %buffer
  return $true
  halt
  :end
  unset %i, %buffer
  return $false
}

; get the /sync date/time components
; assume these are in fixed format! (NTP servers return a fixed length string)
; example: Sat Aug 12 12:42:50 2000
alias -l extractdatetime { 
  if $2 == w {
    return $gettok($1,1,32)
  }
  if $2 == m {
    return $gettok($1,2,32)
  }
  if $2 == d {
    return $gettok($1,3,32)
  }
  if $2 == t {
    return $gettok($1,4,32)
  }
  if $2 == y {
    return $gettok($1,5,32)
  }
}

;
; end of script
;

http://mrfloris.com


  • Jake
  • Registratie: September 1999
  • Niet online
Op dinsdag 17 juli 2001 17:31 schreef RealCato het volgende:
StatBar downloaden en hem laten synchroniseren met atoomklok :)
Dat vind ik eigenlijk wel wat voor Ome Bill, omdat standaard in windows te doen (dat synchroniseren dan).
Wel bij een M$ server dan natuurlijk :o

  • RealCato
  • Registratie: Juli 2000
  • Laatst online: 07-06 08:36
Op dinsdag 17 juli 2001 17:58 schreef Jake het volgende:

[..]

Dat vind ik eigenlijk wel wat voor Ome Bill, omdat standaard in windows te doen (dat synchroniseren dan).
Wel bij een M$ server dan natuurlijk :o
Heeft-ie gedaan, check WinXP, zit tijdsynchronisatie ingebakken....bij een M$ server

Rijtjeshuis 170 m^2 uit 1955, bij renovatie in 2022 dak/vloer/spouwisolatie, overal HR++, vvw benedenverdieping, 7x Jaga Strada en 2 handdoekradiatoren met Tado’s. Quatt hybrid op dakkapel sinds einde 2023.


Verwijderd

Topicstarter
Op dinsdag 17 juli 2001 17:49 schreef de_GeBo het volgende:
Zit je toch niet op een netwerk, waarbij tijdens het aanmelden jouw klok gesynchroniseerd wordt met een server ?
Kijk Jos hier zou het probleem wel eens kunnen zitten :?

  • Jake
  • Registratie: September 1999
  • Niet online
Op dinsdag 17 juli 2001 18:06 schreef RealCato het volgende:
Heeft-ie gedaan, check WinXP, zit tijdsynchronisatie ingebakken....bij een M$ server
Ja is logisch, als ik het kan verzinnen, kunnen ze dat in Redmond ook.

FF on-topic: is het zo dat je clock altijd 5 min voor loopt, ook als je 2 of 3 dagen niets aan doet, of loopt ie gewoon 5 mins te hard per dag ?
Pagina: 1