How would you like to create the time sequence from the data and how is the data currently stored?
E.g. if your original data is in the shape [n_time_points, features] and you would like to create overlapping windows, you could slice it in the __getitem__ of your custom Dataset.
Here is a simple example code:
class MyDataset(Dataset):
    def __init__(self, data, window_size):
        self.data = data
        self.window_size = window_size
        
    def __getitem__(self, index):
        x = self.data[index:index+self.window_size]
        return x
    
    def __len__(self):
        return len(self.data) - self.window_size + 1

data = torch.arange(100).view(100, 1).float()
dataset = MyDataset(data, window_size=10)
loader = DataLoader(dataset, batch_size=2, shuffle=False)

for batch in loader:
    print(batch)

You can also set shuffle=True to shuffle the passed indices.