simple "info" script

hi
i'm writing a little script thet tracks the current resolution and rendertime.
the render engine is iray
here is the code

try destroyDialog getvalues catch()
rollout getvalues "iray_values" width:105 height:100
(
 
		edittext framesettings "" fieldWidth:95 offset:[-12,-3] height:32 align:#left readonly:true
 
		button gv "getval" offset:[1,1] height:16 width:100 align:#center
 
 
	-- Get current resolution and time
	fn curval = 
	(
 
		rws = renderwidth as string
		rhs = renderheight as string
 
		renderers.current = iray_Renderer()
		renderers.current.durationmode = 0
		rc = renderers.current
		rt = rc.durationinseconds
		rts = rt as string
		framesettings.text = ((rws + "x" + rhs) + "\n" +
		rts +
		" secs"  )
 
		)
 
	--)
 
 	on gv pressed do curval()
)
createDialog getvalues

this is partly working since rts is not only reading but also writing to the actual rendertime which is not what i wanted, for example if i put 5 minutes in the render setup it will override that with a default 60 seconds rendertime, basically i can not get the value without setting it, but, if i type this

renderers.current.durationinseconds

in the listener i get the proper value printed which in the example would be 300
could you please help me finding a way to get the correct value in the textbox?
thanks
cdb