draw canvas on heartbeat