mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-19 03:56:14 +02:00
xxx
git-svn-id: svn://elaine/murooma/trunk@6 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
105ac263c0
commit
71949a8366
2 changed files with 20 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -19,7 +20,7 @@ const int size(1024);
|
|||
|
||||
struct Chunk
|
||||
{
|
||||
time_t timestamp;
|
||||
timeval timestamp;
|
||||
char payload[size];
|
||||
};
|
||||
|
||||
|
@ -37,7 +38,7 @@ int main () {
|
|||
while (!cin.get(c).eof())
|
||||
{
|
||||
if (idx == 0)
|
||||
time(&chunk.timestamp);
|
||||
gettimeofday(&chunk.timestamp, 0);
|
||||
|
||||
// read(fd, &msg[0], size);
|
||||
chunk.payload[idx++] = c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue