﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3253	_GetIP() never get called in the first 5 minutes after pc restart	anonymous		"In _GetIP() there is a TimerDiff() called without a previous TimerInit().
So TimerDiff return the time in ms since the computer was started.
The problem is now {{{ If TimerDiff($hTimer) < $GETIP_TIMER }}} will always be true 
in the first $GETIP_TIMER ms since PC start and _GetIP() returns 0.

{{{

Func _GetIP()
	Local Const $GETIP_TIMER = 300000 ; Constant for how many milliseconds between each check. This is 5 minutes.
	Local Static $hTimer = 0 ; Create a static variable to store the timer handle.
	Local Static $sLastIP = 0 ; Create a static variable to store the last IP.

	If TimerDiff($hTimer) < $GETIP_TIMER And Not $sLastIP Then ; If still in the timer and $sLastIP contains a value.
		Return SetExtended(1, $sLastIP) ; Return the last IP instead and set @extended to 1.
	EndIf

.
.
.

EndFunc   ;==>_GetIP

}}}"	Bug	closed		Standard UDFs	3.3.14.2	None	Duplicate	_GetIP	
