Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.
This repository was archived by the owner on May 6, 2025. It is now read-only.

Adicionar biblioteca tempo na documentação #19

@lucaspompeun

Description

@lucaspompeun

As funcionalidades da biblioteca são desacritas abaixo

module.exports.time = function () {
    return +new Date();
};

module.exports.segundos = function () {
    return new Date().getSeconds();
};

module.exports.minutos = function () {
    return new Date().getMinutes();
};

module.exports.horas = function () {
    return new Date().getHours();
};

module.exports.horario = function (timestamp) {
    let timeFormatted = timestamp !== null ? new Date(timestamp) : new Date();
    return timeFormatted;
};

module.exports.dormir = function (ms) {
    let now = new Date().getTime();
    while (new Date().getTime() < now + ms) { }
    return null;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions