File indexing completed on 2024-04-14 03:59:26

0001 /***************************************************************************
0002 *   KBlocks, a falling blocks game by KDE                                 *
0003 *   SPDX-FileCopyrightText: 2019 Thomas Branch <kde@twig.hk>                        *
0004 *                                                                         *
0005 *   SPDX-License-Identifier: GPL-2.0-or-later
0006 ***************************************************************************/
0007 #include "utils.h"
0008 
0009 #include <ctime>
0010 #include <chrono>
0011 
0012 timeLong Utils::getMillisecOfNow()
0013 {
0014     const auto now = std::chrono::system_clock::now();
0015 
0016     return std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
0017 }