Files
cpp-pager/main.cpp
2021-03-29 22:21:34 -05:00

31 lines
582 B
C++

#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <vector>
#include "timercpp.h"
using namespace std;
int main(int argc, char **argv)
{
struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
vector< vector<char> > screen;
Timer t = Timer();
float framerate = 60.0;
float frameduration = 1000.0/framerate;
t.setInterval([&]() {
eachFrame(w.ws_row, w.ws_col, screen);
}, (int) frameduration);
return 0;
}
void eachFrame(short width, short height, vector< vector<char> > screen)
{
}