You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: t_http_an__.go
    path of file: ./repos/lal/pkg/base
    
    the code of the file until where you have to start completion: // Copyright 2022, Chef.  All rights reserved.
// https://github.com/q191201771/lal
//
// Use of this source code is governed by a MIT-style license
// that can be found in the License file.
//
// Author: Chef (191201771@qq.com)

package base

// t_http_an__.go
//
// http-api和http-notify
    
func (p *PeriodRecord) Add(unixSec int64, v uint32) {
	var index int64
	var record RecordPerSec
	index = unixSec % int64(len(p.ringBuf))
	record = p.ringBuf[index]
	if record.UnixSec == unixSec {
		p.ringBuf[index].V = record.V + v
	} else {
		if record.UnixSec == 0 {
			p.nRecord++
		}
		p.ringBuf[index].UnixSec = unixSec
		p.ringBuf[index].V = v
	}
	return
}