mediasoup-sys 0.3.2

FFI bindings to C++ libmediasoup-worker
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "common.hpp"
#include "DepLibUV.hpp"
#include "Utils.hpp"
#include <catch2/catch.hpp>

using namespace Utils;

SCENARIO("Utils::Time::TimeMs2Ntp() and Utils::Time::Ntp2TimeMs()")
{
	auto nowMs  = DepLibUV::GetTimeMs();
	auto ntp    = Time::TimeMs2Ntp(nowMs);
	auto nowMs2 = Time::Ntp2TimeMs(ntp);
	auto ntp2   = Time::TimeMs2Ntp(nowMs2);

	REQUIRE(nowMs2 == nowMs);
	REQUIRE(ntp2.seconds == ntp.seconds);
	REQUIRE(ntp2.fractions == ntp.fractions);
}