This seemed to be a trick:
function viewModel() { var self = this; this.clock = ko.observable(new Date()); this.tick = function() { self.clock(new Date()); }; setInterval(self.tick, 3000); }; ko.applyBindings(new viewModel());
combined with this HTML:
<span data-bind="text: clock"></span>
Gene golovchinsky
source share