Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <chrono>
- #include <ctime>
- #include <unistd.h>
- #include <ncurses.h>
- #include <errno.h>
- #include <sys/wait.h>
- int main()
- {
- FILE* out = fopen("out.txt", "w");
- FILE* in = fopen("in.txt", "w");
- auto child_time = std::chrono::system_clock::now();
- auto time_t_child = std::chrono::system_clock::to_time_t(child_time);
- newterm(getenv("TERM"), out, in);
- std::cout << std::ctime(&time_t_child) << std::endl;
- printw("Time: %s, pid: %d\n", std::ctime(&time_t_child), getpid());
- refresh();
- endwin();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement