That would probably work, but I'm trying to avoid unnecessary calls as it's an onupdate script and'll be running a lot, to the point where I'd be slightly worried about calling GetTime that often when there is probably a already defined value. I was looking through the KGPanels code and found
Code:
if hook == "UPDATE" and strlen(code) > 1 then
local func, errorMessage = loadstring("return function(self,time) "..makeRef().." "..code.." end",name.."_OnUpdate")
if func then
frame:SetScript("OnUpdate",func())
else
self:Print(errorMessage)
end
which is where I thought that the variable time might already be declared.