Fastly Compute C++ SDK
Loading...
Searching...
No Matches
clock.cpp
#include "fastly/sdk.h"
#include <chrono>
#include <ctime>
#include <iostream>
using namespace std::string_literals;
int main() {
fastly::Body body{"It is currently: "};
// You can use `chrono` directly to get and format datetime/clock data.
std::time_t now{
std::chrono::system_clock::to_time_t(std::chrono::system_clock::now())};
body << std::ctime(&now) << std::endl;
}
int main()
Definition async_reqs.cpp:10
static Response from_body(Body body)
Create a new Response with the given value as the body.
Definition body.h:42