1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

Add pre-installed python packages within rootfs overlay

TODO: This is just a quick fix and need to be changed to
buildroot packages in the upcoming days/weeks/months.
This commit is contained in:
j1nx
2022-12-08 21:02:30 +01:00
parent ce2443f753
commit 37d97e1551
36609 changed files with 7287696 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#ifndef PYTHONIC_TIME_SLEEP_HPP
#define PYTHONIC_TIME_SLEEP_HPP
#include "pythonic/include/time/sleep.hpp"
#include "pythonic/utils/functor.hpp"
#include "pythonic/builtins/None.hpp"
#include <thread>
#include <chrono>
PYTHONIC_NS_BEGIN
namespace time
{
types::none_type sleep(double const value)
{
std::this_thread::sleep_for(std::chrono::duration<double>(value));
return builtins::None;
}
}
PYTHONIC_NS_END
#endif

View File

@ -0,0 +1,25 @@
#ifndef PYTHONIC_TIME_TIME_HPP
#define PYTHONIC_TIME_TIME_HPP
#include "pythonic/include/time/time.hpp"
#include "pythonic/utils/functor.hpp"
#include <chrono>
PYTHONIC_NS_BEGIN
namespace time
{
double time()
{
std::chrono::time_point<std::chrono::steady_clock> tp =
std::chrono::steady_clock::now();
return std::chrono::duration_cast<std::chrono::milliseconds>(
tp.time_since_epoch()).count() /
1000.;
}
}
PYTHONIC_NS_END
#endif