I want to show current time on a window in my app which is written using Extjs 3. The time should be updated every one second but I don't know how to do this. this is my code: Can anyone help me please?
function gettime(){
var dt = new Date();
dt = dt.format('h:i:s');
return dt;
};
var clock = { layout:'form', frame:false, region:'center', height:100, width:400,
items:[{id: 'currtime', xtype: 'displayfield',fieldLabel: 'Current Time'
,value:gettime()}]}`