func GetNowNanoSec() int64 {
	return time.Now().UnixNano()
}
GetNowNanoSec returns t as a Unix time, the number of nanoseconds elapsed
since January 1, 1970 UTC. The result is undefined if the Unix time
in nanoseconds cannot be represented by an int64. Note that this
means the result of calling UnixNano on the zero Time is undefined.
gets the current time in Unix time, in nanoseconds.
package oss
import (
	"bytes"
	"errors"
	"fmt"
	"hash/crc64"
	"net/http"
	"os"
	"os/exec"
	"runtime"
	"strconv"
	"strings"
	"time"
)
var userAgent = func() string {
	sys := getSysInfo()
	return fmt.Sprintf("aliyun-sdk-go/%s (%s/%s/%s;%s)", Version, sys.name,
		sys.release, sys.machine, runtime.Version())
}()
type sysInfo struct {
	name    string  
	release string  
	machine string  
}
func getSysInfo() sysInfo {
	name := runtime.GOOS
	release := "-"
	machine := runtime.GOARCH
	if out, err := exec.Command("uname", "-s").CombinedOutput(); err == nil {
		name = string(bytes.TrimSpace(out))
	}
	if out, err := exec.Command("uname", "-r").CombinedOutput(); err == nil {
		release = string(bytes.TrimSpace(out))
	}
	if out, err := exec.Command("uname", "-m").CombinedOutput(); err == nil {
		machine = string(bytes.TrimSpace(out))
	}
	return sysInfo{name: name, release: release, machine: machine}
}
type unpackedRange struct {
	hasStart bool   
	hasEnd   bool   
	start    int64  
	end      int64  
}
func invalidRangeError(r string) error {
	return fmt.Errorf("InvalidRange %s", r)
}
func parseRange(normalizedRange string) (*unpackedRange, error) {
	var err error
	hasStart := false
	hasEnd := false
	var start int64
	var end int64
	nrSlice := strings.Split(normalizedRange, "=")
	if len(nrSlice) != 2 || nrSlice[0] != "bytes" {
		return nil, invalidRangeError(normalizedRange)
	}
	rSlice := strings.Split(nrSlice[1], ",")
	rStr := rSlice[0]
	if strings.HasSuffix(rStr, "-") {  
		startStr := rStr[:len(rStr)-1]
		start, err = strconv.ParseInt(startStr, 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		hasStart = true
	} else if strings.HasPrefix(rStr, "-") {  
		len := rStr[1:]
		end, err = strconv.ParseInt(len, 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		if end == 0 {  
			return nil, invalidRangeError(normalizedRange)
		}
		hasEnd = true
	} else {  
		valSlice := strings.Split(rStr, "-")
		if len(valSlice) != 2 {
			return nil, invalidRangeError(normalizedRange)
		}
		start, err = strconv.ParseInt(valSlice[0], 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		hasStart = true
		end, err = strconv.ParseInt(valSlice[1], 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		hasEnd = true
	}
	return &unpackedRange{hasStart, hasEnd, start, end}, nil
}
func adjustRange(ur *unpackedRange, size int64) (start, end int64) {
	if ur == nil {
		return 0, size
	}
	if ur.hasStart && ur.hasEnd {
		start = ur.start
		end = ur.end + 1
		if ur.start < 0 || ur.start >= size || ur.end > size || ur.start > ur.end {
			start = 0
			end = size
		}
	} else if ur.hasStart {
		start = ur.start
		end = size
		if ur.start < 0 || ur.start >= size {
			start = 0
		}
	} else if ur.hasEnd {
		start = size - ur.end
		end = size
		if ur.end < 0 || ur.end > size {
			start = 0
			end = size
		}
	}
	return
}
func GetNowSec() int64 {
	return time.Now().Unix()
}