Skip to content

Instantly share code, notes, and snippets.

View otoolep's full-sized avatar

Philip O'Toole otoolep

View GitHub Profile
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
//
// How to set timeout for http.Get() in golang
//
package main
import (
"io"
"io/ioutil"
"log"
"net"