function render () {
const sel = d3.select(vis)
let now = new Date()
let hours = now.getHours()
let minutes = now.getMinutes()
let seconds = now.getSeconds()
sel.select('.time-hour').text(hours + ' hrs')
sel.select('.time-minutes').text(minutes + ' mins')
sel.select('.time-seconds').text(seconds + ' secs')
let hoursPercent = Math.floor((100 / 24) * hours)
let minutesPercent = Math.floor((100 / 60) * minutes)
let secondsPercent = Math.floor((100 / 60) * seconds)
sel.select('.percent-hour').text(hoursPercent + ' %')
sel.select('.percent-minutes').text(minutesPercent + ' %')
sel.select('.percent-seconds').text(secondsPercent + ' %')
waffle(hoursPercent, {
bind: sel.select('.chart-hours'),
squareCol: '#a6d40d'
})
waffle(minutesPercent, {
bind: sel.select('.chart-minutes'),
squareCol: '#a6d40d'
})
waffle(secondsPercent, {
bind: sel.select('.chart-seconds'),
squareCol: '#ff5ec4'
})
}