NSTime


    //第一种,自动触发定时器
    {
        NSTimer *time = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(t:) userInfo:@{@"sdfsdf":@"df"} repeats:YES];
        
        NSTimer *time2 = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(t:) userInfo:@"sdfsdf" repeats:YES];

        //这里是提前触发,不写也会在设定间隔时间触发
        [time fire];
    
    //对应的销毁函数
//    [time invalidate];
    }
    
    
    //第二种,手动触发
    {
        NSTimer *time3 = [NSTimer timerWithTimeInterval:2 target:self selector:@selector(t:) userInfo:@"sdf" repeats:YES];

        NSRunLoop *runloop=[NSRunLoop currentRunLoop];
        [runloop addTimer:time3 forMode:NSDefaultRunLoopMode];
    }
    
    
    //第三种
    {
        //初始化一个Invocation对象
        NSInvocation * invo = [NSInvocation invocationWithMethodSignature:[[self class] instanceMethodSignatureForSelector:@selector(init)]];
        [invo setTarget:self];
        [invo setSelector:@selector(t:)];
        NSTimer * timer = [NSTimer timerWithTimeInterval:1 invocation:invo repeats:YES];
        //加入主循环池中
        [[NSRunLoop mainRunLoop]addTimer:timer forMode:NSDefaultRunLoopMode];
        //开始循环
        [timer fire];
        
    }
}

-(void)t:(NSTimer*)n
{
    //传参数  NSNumber  字典  字符串
    id  t = [n userInfo];
    
    //触发的系统时间
    NSData *d = n.fireDate;

}


//暂停、启动、销毁

if(btn.tag == k_link)
    {
        [heartTimer setFireDate:[NSDate distantFuture]];  //暂停
    }
    else if (btn.tag == k_link+1)
    {
        [heartTimer setFireDate:[NSDate distantPast]];   //启动
    }
    else
    {
        [heartTimer invalidate];  //销毁
        heartTimer = nil;
    }




DDR Version 1.22 20190506 In channel 0 CS = 0 MR0=0x19 MR4=0x3 MR5=0x6 MR8=0x10 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0xFF channel 1 CS = 0 MR0=0x19 MR4=0x3 MR5=0x6 MR8=0x10 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0xFF channel 0 training pass! channel 1 training pass! change freq to 416MHz 0,1 Channel 0: LPDDR4,416MHz Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB Channel 1: LPDDR4,416MHz Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB 256B stride channel 0 CS = 0 MR0=0x19 MR4=0x3 MR5=0x6 MR8=0x10 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0xFF channel 1 CS = 0 MR0=0x19 MR4=0x3 MR5=0x6 MR8=0x10 MR12=0x72 MR14=0x72 MR18=0x0 MR19=0x0 MR24=0x8 MR25=0xFF channel 0 training pass! channel 1 training pass! channel 0, cs 0, advanced training done channel 1, cs 0, advanced training done change freq to 856MHz 1,0 ch 0 ddrconfig = 0x101, ddrsize = 0x40 ch 1 ddrconfig = 0x101, ddrsize = 0x40 pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD OUT Boot1: 2018-08-06, version: 1.15 CPUId = 0x0 ChipType = 0x10, 225 SdmmcInit=2 0 BootCapSize=100000 UserCapSize=14952MB FwPartOffset=2000 , 100000 mmc0:cmd8,20 mmc0:cmd5,20 mmc0:cmd55,20 mmc0:cmd1,20 mmc0:cmd8,20 mmc0:cmd5,20 mmc0:cmd55,20 mmc0:cmd1,20 mmc0:cmd8,20 mmc0:cmd5,20 mmc0:cmd55,20 mmc0:cmd1,20 SdmmcInit=0 1 StorageInit ok = 70833 SecureMode = 0 SecureInit read PBA: 0x4 SecureInit read PBA: 0x404 SecureInit read PBA: 0x804 SecureInit read PBA: 0xc04 SecureInit read PBA: 0x1004 SecureInit read PBA: 0x1404 SecureInit read PBA: 0x1804 SecureInit read PBA: 0x1c04 SecureInit ret = 0, SecureMode = 0 GPT 0x3190d20 signature is wrong LoadTrust Addr:0x4000 No find bl30.bin Load uboot, ReadLba = 2000 Load OK, addr=0x200000, size=0x8a504 RunBL31 0x10000 NOTICE: BL31: v1.3(debug):51f2096 NOTICE: BL31: Built : 16:24:31, May 6 2019 NOTICE: BL31: Rockchip release version: v1.1 INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3 INFO: Using opteed sec cpu_context! INFO: boot cpu mask: 0 INFO: plat_rockchip_pmu_init(1181): pd status 3e INFO: BL31: Initializing runtime services INFO: BL31: Initializing BL32 INF [0x0] TEE-CORE:init_primary_helper:337: Initializing (1.1.0-195-g8f090d20 #6 Fri Dec 7 06:11:20 UTC 2018 aarch64) INF [0x0] TEE-CORE:init_primary_helper:338: Release version: 1.2 INF [0x0] TEE-CORE:init_teecore:83: teecore inits done INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x200000 INFO: SPSR = 0x3c9 U-Boot 2014.10-RK3399-06 (Jan 07 2021 - 17:09:22) CPU: rk3399 cpu version = 0 CPU's clock information: aplll = 816000000HZ apllb = 24000000HZ gpll = 800000000HZ aclk_periph_h = 133333333HZ, hclk_periph_h = 66666666HZ, pclk_periph_h = 33333333HZ aclk_periph_l0 = 266666666HZ, hclk_periph_l0 = 88888888HZ, pclk_periph_l0 = 44444444HZ hclk_periph_l1 = 100000000HZ, pclk_periph_l1 = 50000000HZ cpll = 800000000HZ dpll = 856000000HZ vpll = 24000000HZ npll = 24000000HZ ppll = 676000000HZ Board: Rockchip platform Board Uboot as second level loader DRAM: Found dram banks: 1 Adding bank:0000000000200000(00000000ffe00000) Reserve memory for trust os. dram reserve bank: base = 0x08400000, size = 0x01e00000 128 MiB SdmmcInit = 0 20 mmc: ERROR: sdhci_complete_adma: transfer error, stat 0x408000, adma error 0x0, retry 9999754, cmd 0x123a mmc: ERROR: SDHCI:Transfer data timeout mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0 mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock mmc: ERROR: tuning execution failed mmc: ERROR: mmc_retune fail:-5 storage init OK! Using default environment mmc: ERROR: sdhci_complete_adma: transfer error, stat 0x18000, adma error 0x0, retry 9998, cmd 0x113a mmc: ERROR: SDHCI:Transfer data timeout mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0 mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock mmc: ERROR: tuning execution failed mmc: ERROR: mmc_retune fail:-5 read_env failed at 0 GetParam mmc: ERROR: sdhci_complete_adma: transfer error, stat 0x18000, adma error 0x0, retry 9998, cmd 0x123a mmc: ERROR: SDHCI:Transfer data timeout mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0 mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock mmc: ERROR: tuning execution failed mmc: ERROR: mmc_retune fail:-5 read parameter fail remotectl v0.1 pwm freq=0xb8320 pwm_freq_nstime=0x52d No pmic detect. CPU's clock information: aplll = 816000000HZ apllb = 24000000HZ gpll = 800000000HZ aclk_periph_h = 133333333HZ, hclk_periph_h = 66666666HZ, pclk_periph_h = 33333333HZ aclk_periph_l0 = 266666666HZ, hclk_periph_l0 = 88888888HZ, pclk_periph_l0 = 44444444HZ hclk_periph_l1 = 100000000HZ, pclk_periph_l1 = 50000000HZ cpll = 800000000HZ dpll = 856000000HZ vpll = 24000000HZ npll = 24000000HZ ppll = 676000000HZ misc partition not found! mmc: ERROR: sdhci_complete_adma: transfer error, stat 0x18000, adma error 0x0, retry 9998, cmd 0x113a mmc: ERROR: SDHCI:Transfer data timeout mmc: ERROR: SDHCI ERR:cmd:0x153a,stat:0x0 mmc: ERROR: Tuning procedure failed, falling back to fixed sampling clock mmc: ERROR: tuning execution failed mmc: ERROR: mmc_retune fail:-5 mmc: ERROR: sdhci_complete_adma: transfer error, stat 0x18000, adma error 0x0, retry 9998, cmd 0x113a
最新发布
09-26
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值