js/clients/SparkCore.js
function(msg) {

        //moment#unix outputs a Unix timestamp (the number of seconds since the Unix Epoch).
        var stamp = moment().utc().unix();
        var binVal = messages.ToBinary(stamp, "uint32");

        this.sendReply("GetTimeReturn", msg.getId(), binVal, msg.getToken());
    }
function(msg) {

        //moment#unix outputs a Unix timestamp (the number of seconds since the Unix Epoch).
        var stamp = moment().utc().unix();
        var binVal = messages.ToBinary(stamp, "uint32");

        this.sendReply("GetTimeReturn", msg.getId(), binVal, msg.getToken());
    }
function ( msg ) { //moment#unix outputs a Unix timestamp (the number of seconds since the Unix Epoch). var stamp = moment ( ) . utc ( ) . unix ( ) ; var binVal = messages . ToBinary ( stamp , "uint32" ) ; this . sendReply ( "GetTimeReturn" , msg . getId ( ) , binVal , msg . getToken ( ) ) ; }
The core asked us for the time!
@param msg
The core asked us for the time!